summaryrefslogtreecommitdiffhomepage
path: root/gui/options-dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/options-dialog.cpp')
-rw-r--r--gui/options-dialog.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index 8cf67e6d..bafddb57 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -16,24 +16,19 @@
QString OptionsDialog::kopts_to_string(const key_opts& kopts)
{
- const QString str = kopts.keycode;
- if (!str.isEmpty())
+ if (static_cast<QString>(kopts.guid) != "")
{
- if (str.startsWith("Num+"))
- return tr("Num+") + str.mid(4);
-
const int btn = kopts.button & ~Qt::KeyboardModifierMask;
const int mods = kopts.button & Qt::KeyboardModifierMask;
QString mm;
-
- if (mods & Qt::ControlModifier) mm += tr("Control+");
- if (mods & Qt::AltModifier) mm += tr("Alt+");
- if (mods & Qt::ShiftModifier) mm += tr("Shift+");
-
+ if (mods & Qt::ControlModifier) mm += "Control+";
+ if (mods & Qt::AltModifier) mm += "Alt+";
+ if (mods & Qt::ShiftModifier) mm += "Shift+";
return mm + tr("Joy button %1").arg(QString::number(btn));
}
- else
+ if (static_cast<QString>(kopts.keycode) == "")
return tr("None");
+ return kopts.keycode;
}
void OptionsDialog::set_disable_translation_state(bool value)