From 4885f2d70d71f92d505cb33738dd592727cd036c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 3 May 2024 03:42:29 +0300 Subject: 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 Reviewed-by: Umang Jain Reviewed-by: Stefan Klug --- src/apps/qcam/main_window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp index 0f16c038..361d5825 100644 --- a/src/apps/qcam/main_window.cpp +++ b/src/apps/qcam/main_window.cpp @@ -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. */ -- cgit v1.2.1