aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/welcome
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2016-08-10 15:07:27 +0200
committerEike Ziller <eike.ziller@qt.io>2016-08-10 13:20:11 +0000
commitbcbda07b7f0e9aa1f08a249145746ebc3761e51b (patch)
tree5c1af37d5a32a22b2a054e2e1a0b676d84ca698e /src/plugins/welcome
parentfc75b96dca63b82063d047b1d6024e5673fbb026 (diff)
Welcome: Fix shortcuts in tool tips
They need to show the native shortcuts, not portable Change-Id: I5fbc1704c4908596aaf9cdbecf056a50e33f8fe6 Reviewed-by: Serhii Moroz <frost.asm@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/welcome')
-rw-r--r--src/plugins/welcome/welcomeplugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp
index c8845270a4..76d50f4689 100644
--- a/src/plugins/welcome/welcomeplugin.cpp
+++ b/src/plugins/welcome/welcomeplugin.cpp
@@ -247,11 +247,11 @@ void WelcomeMode::addKeyboardShortcuts()
auto act = new QAction(tr("Open Session #%1").arg(i), this);
Command *cmd = ActionManager::registerAction(act, sessionBase.withSuffix(i), welcomeContext);
cmd->setDefaultKeySequence(QKeySequence((UseMacShortcuts ? tr("Ctrl+Meta+%1") : tr("Ctrl+Alt+%1")).arg(i)));
- m_sessionsShortcuts.append(cmd->keySequence().toString());
+ m_sessionsShortcuts.append(cmd->keySequence().toString(QKeySequence::NativeText));
connect(act, &QAction::triggered, this, [this, i] { openSessionTriggered(i-1); });
connect(cmd, &Command::keySequenceChanged, this, [this, i, cmd] {
- m_sessionsShortcuts[i-1] = cmd->keySequence().toString();
+ m_sessionsShortcuts[i-1] = cmd->keySequence().toString(QKeySequence::NativeText);
emit sessionsShortcutsChanged(m_sessionsShortcuts);
});
}
@@ -261,11 +261,11 @@ void WelcomeMode::addKeyboardShortcuts()
auto act = new QAction(tr("Open Recent Project #%1").arg(i), this);
Command *cmd = ActionManager::registerAction(act, projectBase.withSuffix(i), welcomeContext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+%1").arg(i)));
- m_recentProjectsShortcuts.append(cmd->keySequence().toString());
+ m_recentProjectsShortcuts.append(cmd->keySequence().toString(QKeySequence::NativeText));
connect(act, &QAction::triggered, this, [this, i] { openRecentProjectTriggered(i-1); });
connect(cmd, &Command::keySequenceChanged, this, [this, i, cmd] {
- m_recentProjectsShortcuts[i-1] = cmd->keySequence().toString();
+ m_recentProjectsShortcuts[i-1] = cmd->keySequence().toString(QKeySequence::NativeText);
emit recentProjectsShortcutsChanged(m_recentProjectsShortcuts);
});
}