Commit eea1895a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

operator+/- is disabled for QFlags in qt6

parent f1016f36
......@@ -98,12 +98,12 @@ int main(int argc, char **argv)
QAction* openAction = shortCutActions.action(QStringLiteral("_launch"));
KGlobalAccel::self()->setDefaultShortcut(openAction, {Qt::Key_Print});
QAction* fullScreenAction = shortCutActions.action(QStringLiteral("FullScreenScreenShot"));
KGlobalAccel::self()->setDefaultShortcut(fullScreenAction, {Qt::SHIFT + Qt::Key_Print});
KGlobalAccel::self()->setDefaultShortcut(fullScreenAction, {Qt::SHIFT | Qt::Key_Print});
//QAction* currentScreenAction = shortCutActions.action(QStringLiteral("CurrentMonitorScreenShot"));
QAction* activeWindowAction = shortCutActions.action(QStringLiteral("ActiveWindowScreenShot"));
KGlobalAccel::self()->setDefaultShortcut(activeWindowAction, {Qt::META + Qt::Key_Print});
KGlobalAccel::self()->setDefaultShortcut(activeWindowAction, {Qt::META | Qt::Key_Print});
QAction* regionAction = shortCutActions.action(QStringLiteral("RectangularRegionScreenShot"));
KGlobalAccel::self()->setDefaultShortcut(regionAction, {Qt::META + Qt::SHIFT + Qt::Key_Print});
KGlobalAccel::self()->setDefaultShortcut(regionAction, {Qt::META | Qt::SHIFT | Qt::Key_Print});
// Finally reinstate the old shortcuts
if (found_spectacle) {
KGlobalAccel::self()->setShortcut(openAction, launchKey, KGlobalAccel::NoAutoloading);
......
......@@ -238,11 +238,11 @@ void SpectacleCore::setUpShortcuts()
{
KGlobalAccel::self()->setGlobalShortcut(ShortcutActions::self()->openAction(), Qt::Key_Print);
KGlobalAccel::self()->setGlobalShortcut(ShortcutActions::self()->fullScreenAction(), Qt::SHIFT + Qt::Key_Print);
KGlobalAccel::self()->setGlobalShortcut(ShortcutActions::self()->fullScreenAction(), Qt::SHIFT | Qt::Key_Print);
KGlobalAccel::self()->setGlobalShortcut(ShortcutActions::self()->activeWindowAction(), Qt::META + Qt::Key_Print);
KGlobalAccel::self()->setGlobalShortcut(ShortcutActions::self()->activeWindowAction(), Qt::META | Qt::Key_Print);
KGlobalAccel::self()->setGlobalShortcut(ShortcutActions::self()->regionAction(), Qt::META + Qt::SHIFT + Qt::Key_Print);
KGlobalAccel::self()->setGlobalShortcut(ShortcutActions::self()->regionAction(), Qt::META | Qt::SHIFT | Qt::Key_Print);
KGlobalAccel::self()->setGlobalShortcut(ShortcutActions::self()->currentScreenAction(), QList<QKeySequence>());
}
......
Markdown is supported
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