Commit 0c03e0c6 authored by Pablo Rauzy's avatar Pablo Rauzy Committed by Christoph Cullmann
Browse files

using strings for QKeySequence constructor to maybe fix Qt6 compilations which...

using strings for QKeySequence constructor to maybe fix Qt6 compilations which expects QKeyCombination which does not exists in Qt5 yet
parent 8e07889c
......@@ -443,7 +443,7 @@ KeyboardMacrosPluginView::KeyboardMacrosPluginView(KeyboardMacrosPlugin *plugin,
QAction *record = actionCollection()->addAction(QStringLiteral("keyboardmacros_record"));
record->setText(i18n("&Record Macro..."));
record->setToolTip(i18n("Start/stop recording a macro (i.e., keyboard action sequence)."));
actionCollection()->setDefaultShortcut(record, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_K));
actionCollection()->setDefaultShortcut(record, QKeySequence(QStringLiteral("Ctrl+Shift+K"), QKeySequence::PortableText));
connect(record, &QAction::triggered, plugin, &KeyboardMacrosPlugin::slotRecord);
plugin->m_recordAction = record;
......@@ -451,7 +451,7 @@ KeyboardMacrosPluginView::KeyboardMacrosPluginView(KeyboardMacrosPlugin *plugin,
QAction *cancel = actionCollection()->addAction(QStringLiteral("keyboardmacros_cancel"));
cancel->setText(i18n("&Cancel Macro Recording"));
cancel->setToolTip(i18n("Cancel ongoing recording (and keep the previous macro as the current one)."));
actionCollection()->setDefaultShortcut(cancel, QKeySequence(Qt::ALT | Qt::SHIFT | Qt::Key_K, Qt::Key_C));
actionCollection()->setDefaultShortcut(cancel, QKeySequence(QStringLiteral("Alt+Shift+K, C"), QKeySequence::PortableText));
cancel->setEnabled(false);
connect(cancel, &QAction::triggered, plugin, &KeyboardMacrosPlugin::slotCancel);
plugin->m_cancelAction = cancel;
......@@ -460,7 +460,7 @@ KeyboardMacrosPluginView::KeyboardMacrosPluginView(KeyboardMacrosPlugin *plugin,
QAction *play = actionCollection()->addAction(QStringLiteral("keyboardmacros_play"));
play->setText(i18n("&Play Macro"));
play->setToolTip(i18n("Play current macro (i.e., execute the last recorded keyboard action sequence)."));
actionCollection()->setDefaultShortcut(play, QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_K));
actionCollection()->setDefaultShortcut(play, QKeySequence(QStringLiteral("Ctrl+Alt+K"), QKeySequence::PortableText));
play->setEnabled(false);
connect(play, &QAction::triggered, plugin, &KeyboardMacrosPlugin::slotPlay);
plugin->m_playAction = play;
......@@ -469,7 +469,7 @@ KeyboardMacrosPluginView::KeyboardMacrosPluginView(KeyboardMacrosPlugin *plugin,
QAction *saveNamed = actionCollection()->addAction(QStringLiteral("keyboardmacros_named_save"));
saveNamed->setText(i18n("&Save Current Macro"));
saveNamed->setToolTip(i18n("Give a name to the current macro and persistently save it."));
actionCollection()->setDefaultShortcut(saveNamed, QKeySequence(Qt::ALT | Qt::SHIFT | Qt::Key_K, Qt::Key_S));
actionCollection()->setDefaultShortcut(saveNamed, QKeySequence(QStringLiteral("Alt+Shift+K, S"), QKeySequence::PortableText));
saveNamed->setEnabled(false);
connect(saveNamed, &QAction::triggered, plugin, &KeyboardMacrosPlugin::slotSaveNamed);
plugin->m_saveNamedAction = saveNamed;
......@@ -478,7 +478,7 @@ KeyboardMacrosPluginView::KeyboardMacrosPluginView(KeyboardMacrosPlugin *plugin,
QAction *loadNamed = actionCollection()->addAction(QStringLiteral("keyboardmacros_named_load"));
loadNamed->setText(i18n("&Load Named Macro"));
loadNamed->setToolTip(i18n("Load a named macro as the current one."));
actionCollection()->setDefaultShortcut(loadNamed, QKeySequence(Qt::ALT | Qt::SHIFT | Qt::Key_K, Qt::Key_L));
actionCollection()->setDefaultShortcut(loadNamed, QKeySequence(QStringLiteral("Alt+Shift+K, L"), QKeySequence::PortableText));
loadNamed->setEnabled(!plugin->m_namedMacros.isEmpty());
connect(loadNamed, &QAction::triggered, plugin, &KeyboardMacrosPlugin::slotLoadNamed);
plugin->m_loadNamedAction = loadNamed;
......@@ -487,7 +487,7 @@ KeyboardMacrosPluginView::KeyboardMacrosPluginView(KeyboardMacrosPlugin *plugin,
// QAction *playNamed = actionCollection()->addAction(QStringLiteral("keyboardmacros_named_play"));
// playNamed->setText(i18n("&Play Named Macro"));
// playNamed->setToolTip(i18n("Play a named macro without loading it."));
// actionCollection()->setDefaultShortcut(playNamed, QKeySequence(Qt::ALT | Qt::SHIFT | Qt::Key_K, Qt::Key_P));
// actionCollection()->setDefaultShortcut(playNamed, QKeySequence(QStringLiteral("Alt+Shift+K, P"), QKeySequence::PortableText));
// playNamed->setEnabled(!plugin->m_namedMacros.isEmpty());
// connect(playNamed, &QAction::triggered, plugin, &KeyboardMacrosPlugin::slotPlayNamed);
// plugin->m_playNamedAction = playNamed;
......@@ -496,7 +496,7 @@ KeyboardMacrosPluginView::KeyboardMacrosPluginView(KeyboardMacrosPlugin *plugin,
QAction *deleteNamed = actionCollection()->addAction(QStringLiteral("keyboardmacros_named_delete"));
deleteNamed->setText(i18n("&Delete Named Macro"));
deleteNamed->setToolTip(i18n("Delete a named macro."));
actionCollection()->setDefaultShortcut(deleteNamed, QKeySequence(Qt::ALT | Qt::SHIFT | Qt::Key_K, Qt::Key_D));
actionCollection()->setDefaultShortcut(deleteNamed, QKeySequence(QStringLiteral("Alt+Shift+K, D"), QKeySequence::PortableText));
deleteNamed->setEnabled(!plugin->m_namedMacros.isEmpty());
connect(deleteNamed, &QAction::triggered, plugin, &KeyboardMacrosPlugin::slotDeleteNamed);
plugin->m_deleteNamedAction = deleteNamed;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment