ui: Set Ctrl+, as a fallback shortcut for Edit->Preferences

This commit is contained in:
Oleg Shparber 2018-01-18 00:55:44 +02:00
parent 7fbabfc425
commit b18f88d852

View File

@ -186,6 +186,12 @@ MainWindow::MainWindow(Core::Application *app, QWidget *parent) :
currentTab()->activateSearchBar();
});
if (QKeySequence(QKeySequence::Preferences).isEmpty()) {
ui->actionPreferences->setShortcut(QStringLiteral("Ctrl+,"));
} else {
ui->actionPreferences->setShortcut(QKeySequence::Quit);
}
connect(ui->actionPreferences, &QAction::triggered, [this]() {
m_globalShortcut->setEnabled(false);
QScopedPointer<SettingsDialog> dialog(new SettingsDialog(this));