UI: Use pipe operator instead of plus for Qt keys
This commit is contained in:
parent
17ba8359e4
commit
49e37db952
@ -956,7 +956,7 @@ void OBSBasicFilters::CustomContextMenu(const QPoint &pos, bool async)
|
|||||||
QAction *copyAction = new QAction(QTStr("Copy"));
|
QAction *copyAction = new QAction(QTStr("Copy"));
|
||||||
connect(copyAction, SIGNAL(triggered()), this,
|
connect(copyAction, SIGNAL(triggered()), this,
|
||||||
SLOT(CopyFilter()));
|
SLOT(CopyFilter()));
|
||||||
copyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_C));
|
copyAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_C));
|
||||||
ui->effectWidget->addAction(copyAction);
|
ui->effectWidget->addAction(copyAction);
|
||||||
ui->asyncWidget->addAction(copyAction);
|
ui->asyncWidget->addAction(copyAction);
|
||||||
popup.addAction(copyAction);
|
popup.addAction(copyAction);
|
||||||
@ -965,7 +965,7 @@ void OBSBasicFilters::CustomContextMenu(const QPoint &pos, bool async)
|
|||||||
QAction *pasteAction = new QAction(QTStr("Paste"));
|
QAction *pasteAction = new QAction(QTStr("Paste"));
|
||||||
pasteAction->setEnabled(main->copyFilter);
|
pasteAction->setEnabled(main->copyFilter);
|
||||||
connect(pasteAction, SIGNAL(triggered()), this, SLOT(PasteFilter()));
|
connect(pasteAction, SIGNAL(triggered()), this, SLOT(PasteFilter()));
|
||||||
pasteAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_V));
|
pasteAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_V));
|
||||||
ui->effectWidget->addAction(pasteAction);
|
ui->effectWidget->addAction(pasteAction);
|
||||||
ui->asyncWidget->addAction(pasteAction);
|
ui->asyncWidget->addAction(pasteAction);
|
||||||
popup.addAction(pasteAction);
|
popup.addAction(pasteAction);
|
||||||
|
@ -376,7 +376,7 @@ OBSBasic::OBSBasic(QWidget *parent)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
ui->actionE_xit->setShortcut(Qt::CTRL + Qt::Key_Q);
|
ui->actionE_xit->setShortcut(Qt::CTRL | Qt::Key_Q);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto addNudge = [this](const QKeySequence &seq, const char *s) {
|
auto addNudge = [this](const QKeySequence &seq, const char *s) {
|
||||||
@ -391,10 +391,10 @@ OBSBasic::OBSBasic(QWidget *parent)
|
|||||||
addNudge(Qt::Key_Down, SLOT(NudgeDown()));
|
addNudge(Qt::Key_Down, SLOT(NudgeDown()));
|
||||||
addNudge(Qt::Key_Left, SLOT(NudgeLeft()));
|
addNudge(Qt::Key_Left, SLOT(NudgeLeft()));
|
||||||
addNudge(Qt::Key_Right, SLOT(NudgeRight()));
|
addNudge(Qt::Key_Right, SLOT(NudgeRight()));
|
||||||
addNudge(Qt::SHIFT + Qt::Key_Up, SLOT(NudgeUpFar()));
|
addNudge(Qt::SHIFT | Qt::Key_Up, SLOT(NudgeUpFar()));
|
||||||
addNudge(Qt::SHIFT + Qt::Key_Down, SLOT(NudgeDownFar()));
|
addNudge(Qt::SHIFT | Qt::Key_Down, SLOT(NudgeDownFar()));
|
||||||
addNudge(Qt::SHIFT + Qt::Key_Left, SLOT(NudgeLeftFar()));
|
addNudge(Qt::SHIFT | Qt::Key_Left, SLOT(NudgeLeftFar()));
|
||||||
addNudge(Qt::SHIFT + Qt::Key_Right, SLOT(NudgeRightFar()));
|
addNudge(Qt::SHIFT | Qt::Key_Right, SLOT(NudgeRightFar()));
|
||||||
|
|
||||||
assignDockToggle(ui->scenesDock, ui->toggleScenes);
|
assignDockToggle(ui->scenesDock, ui->toggleScenes);
|
||||||
assignDockToggle(ui->sourcesDock, ui->toggleSources);
|
assignDockToggle(ui->sourcesDock, ui->toggleSources);
|
||||||
@ -404,10 +404,10 @@ OBSBasic::OBSBasic(QWidget *parent)
|
|||||||
assignDockToggle(statsDock, ui->toggleStats);
|
assignDockToggle(statsDock, ui->toggleStats);
|
||||||
|
|
||||||
// Register shortcuts for Undo/Redo
|
// Register shortcuts for Undo/Redo
|
||||||
ui->actionMainUndo->setShortcut(Qt::CTRL + Qt::Key_Z);
|
ui->actionMainUndo->setShortcut(Qt::CTRL | Qt::Key_Z);
|
||||||
QList<QKeySequence> shrt;
|
QList<QKeySequence> shrt;
|
||||||
shrt << QKeySequence((Qt::CTRL | Qt::SHIFT) + Qt::Key_Z)
|
shrt << QKeySequence((Qt::CTRL | Qt::SHIFT) | Qt::Key_Z)
|
||||||
<< QKeySequence(Qt::CTRL + Qt::Key_Y);
|
<< QKeySequence(Qt::CTRL | Qt::Key_Y);
|
||||||
ui->actionMainRedo->setShortcuts(shrt);
|
ui->actionMainRedo->setShortcuts(shrt);
|
||||||
|
|
||||||
ui->actionMainUndo->setShortcutContext(Qt::ApplicationShortcut);
|
ui->actionMainUndo->setShortcutContext(Qt::ApplicationShortcut);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user