apps: qcam: Use standard key sequence for quit action
Replace the manual CTRL+Q key sequence with QKeySequence::Quit. This automatically maps to the native shortcut for the quit action, regardless of the platform. Even though we don't expect qcam to run on non-Linux platform, using a QKeySequence is still a good practice when one exists. This doesn't change qcam's behaviour, as the native quit key sequence is CTRL+Q on Linux systems. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
This commit is contained in:
parent
acf61456cc
commit
4885f2d70d
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ int MainWindow::createToolbars()
|
|||
action = toolbar_->addAction(QIcon::fromTheme("application-exit",
|
||||
QIcon(":x-circle.svg")),
|
||||
"Quit");
|
||||
action->setShortcut(Qt::CTRL | Qt::Key_Q);
|
||||
action->setShortcut(QKeySequence::Quit);
|
||||
connect(action, &QAction::triggered, this, &MainWindow::quit);
|
||||
|
||||
/* Camera selector. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue