From patchwork Sat Apr 15 20:10:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 674338 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59081C77B73 for ; Sat, 15 Apr 2023 20:11:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbjDOULI (ORCPT ); Sat, 15 Apr 2023 16:11:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbjDOULC (ORCPT ); Sat, 15 Apr 2023 16:11:02 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C9523C25 for ; Sat, 15 Apr 2023 13:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1681589459; i=ps.report@gmx.net; bh=gV1CjmB/97FXVjZ9FCZRGpD++tNse9ciaAzi7LGg6KU=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=JuYZv8ScjF+/7IILQtsj2L6dEz4RqQ8MqgGNAf1aAEbWT7W9PG/RjsPoBIRJnc2OW 73NKCk0LsL6xRg+bAPKtiefV3jaSc5nyVUUpxOwtyADOPq8JOK2aKrTmKEfrpne7ZP 67Rn9oD9+lGhykLOTBiQZNfmbj7bdLx/fFy1SxTYFN34F5h7nAURIVaUOYuJSon66q TZ7xNadxCXVVCqNznuOReIYl0sn2qR6usAYNU47yU3RnNKOqP26KKWMlJGRJUFttII s5YG9daGOw5I/KZVG4o54euQcVyhsvcr412Hed6YSdyJYCSOlkP7yLdcm63E5CdjPN w1axHtg+jxueQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from localhost.fritz.box ([62.216.208.95]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MfHAB-1qFiSf3J9v-00gmaK for ; Sat, 15 Apr 2023 22:10:58 +0200 From: Peter Seiderer To: linux-media@vger.kernel.org Subject: [PATCH v4l-utils v1 09/11] qv4l2: fix Qt6 warnings (QKeyCombination operator+ is deprecated) Date: Sat, 15 Apr 2023 22:10:54 +0200 Message-Id: <20230415201056.31080-9-ps.report@gmx.net> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230415201056.31080-1-ps.report@gmx.net> References: <20230415201056.31080-1-ps.report@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:cLkDtHTVEEZjPy6ZevN9dCbaVTLgwWA3eo1wR5PM68hhXgibuAG ksu9nr9yRtBg2WHJneLsxoSTdmqvwB0MZJfANNPmxIIP3sbl8sLIFbMEa8+Cb5ycXSaIPEp DKL7BTuDL02LzIwRbMwNOPV3HhIkxtNJXM07unxPIeNqYrNvn6Z5n6h6im7SSk0KcMTtki0 WvWQmbgpyxo/W3feEHDag== UI-OutboundReport: notjunk:1;M01:P0:T4N7DAPt/2Q=;PIqhQ+j2GPAGEpWYdtMEF9cMdtW ifPjc9iyk395+3Jap3WIVLox1eZ5rDrVmMqVNBiiCxxhhb0e8jCxLTDXRI3J6V6/GOillRtSR 0rYo5CsuD1JPyGij2YwqZtCp+5BDyH6wWZnI5BhUyoKz1NSpEIZOpIgEwv12QweMI0x+ZUb9q aJnqLaflxYmk8fUXO3BSMFN6G+NXjQQ1ftdNvEG/AUxmTnCzCo84B03fZiTgaK1hkgNN4b06V T9IG3r230v8iH4BNvGVCVWqTUK7LblLWPW7hRVorfeA8aWTxZxMcwOupXTJQk/tkZguCrVNA6 /Tlhtz2GzF+ZFZmLoPf2XPcqvhHEVRKyIxXCdjNmY7wvuI/FkN2DwKKcC26EP7+25/TboA/qV aT8T2FtraHdgFYFwHLKAmKaw9/ONqMXP+RDR6IuceeBUAudYXSZw0vFhs4dAWXRqwdVo03HDw 7uMQYT6tEJ79MxGxY7yOcdt79qhXojTTWGfvwQr98X6DqiCiDgTyFjJa/kUE4DogTP+JpIt/2 olEABxbZvqk35OK/q3RhRxR14HhUdfkKgAVGEFR6dghPehHCucDembXglsh8Ixjduj4pKLcX0 sIRjpYwcye5aOXQWXMMtKcV4KJLXRPlOygrrheKp+DoSbUwB/85RsMAz4FlsVnnz6DzdqgLNL WKD1hMlnIRkLhYeuzVU6JF+y8BiN8ArGKkF8IdtIUeHBSqZpLyYU3BbFE83qVb/H38U5Hkjn0 OX0o2DioQSXZbHtDLd8asjmKFtd8VSR5vMqdIJMj9Ah7UqDvBZuCv2kx1nEthO9NHL+gJmN/6 ziy97QP7biMrLOIXNAsJAs8CxytUjRQZNm9p4g2ap5KE7rGUPmijbSaEz7Lg5Xe0bzWFSm/Z1 4jnkt1SHzyoB04+h8TbAfPKLWPdg61We/ot70MwPxCV8TmvLt5C3SUjB9ldrgw/EQroXggUgR 8eY0CAjpOsA1s9xwKMHJcvRV+kI= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes: ../qv4l2/capture-win.cpp:49:57: warning: ‘constexpr QKeyCombination operator+(Qt::Modifier, Qt::Key)’ is deprecated: Use operator| instead [-Wdeprecated-declarations] 49 | m_hotkeyScaleReset = new QShortcut(Qt::CTRL+Qt::Key_F, this); | ^~~~~ ../qv4l2/capture-win.cpp:69:35: warning: ‘constexpr QKeyCombination operator+(Qt::Modifier, Qt::Key)’ is deprecated: Use operator| instead [-Wdeprecated-declarations] 69 | shortcuts << Qt::CTRL+Qt::Key_W; | ^~~~~ ../qv4l2/qv4l2.cpp:135:43: warning: ‘constexpr QKeyCombination operator+(Qt::Modifier, Qt::Key)’ is deprecated: Use operator| instead [-Wdeprecated-declarations] 135 | openAct->setShortcut(Qt::CTRL+Qt::Key_O); | ^~~~~ ../qv4l2/qv4l2.cpp:140:46: warning: ‘constexpr QKeyCombination operator+(Qt::Modifier, Qt::Key)’ is deprecated: Use operator| instead [-Wdeprecated-declarations] 140 | openRawAct->setShortcut(Qt::CTRL+Qt::Key_R); | ^~~~~ ../qv4l2/qv4l2.cpp:147:49: warning: ‘constexpr QKeyCombination operator+(Qt::Modifier, Qt::Key)’ is deprecated: Use operator| instead [-Wdeprecated-declarations] 147 | m_capStartAct->setShortcut(Qt::CTRL+Qt::Key_V); | ^~~~~ ../qv4l2/qv4l2.cpp:172:44: warning: ‘constexpr QKeyCombination operator+(Qt::Modifier, Qt::Key)’ is deprecated: Use operator| instead [-Wdeprecated-declarations] 172 | closeAct->setShortcut(Qt::CTRL+Qt::Key_W); | ^~~~~ ../qv4l2/qv4l2.cpp:182:43: warning: ‘constexpr QKeyCombination operator+(Qt::Modifier, Qt::Key)’ is deprecated: Use operator| instead [-Wdeprecated-declarations] 182 | quitAct->setShortcut(Qt::CTRL+Qt::Key_Q); | ^~~~~ ../qv4l2/qv4l2.cpp:212:53: warning: ‘constexpr QKeyCombination operator+(Qt::Modifier, Qt::Key)’ is deprecated: Use operator| instead [-Wdeprecated-declarations] 212 | m_resetScalingAct->setShortcut(Qt::CTRL+Qt::Key_F); | ^~~~~ Signed-off-by: Peter Seiderer --- utils/qv4l2/capture-win.cpp | 4 ++-- utils/qv4l2/qv4l2.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/qv4l2/capture-win.cpp b/utils/qv4l2/capture-win.cpp index ef33a91b..c184381f 100644 --- a/utils/qv4l2/capture-win.cpp +++ b/utils/qv4l2/capture-win.cpp @@ -46,7 +46,7 @@ CaptureWin::CaptureWin(ApplicationWindow *aw) : m_appWin(aw) { setWindowTitle("V4L2 Capture"); - m_hotkeyScaleReset = new QShortcut(Qt::CTRL+Qt::Key_F, this); + m_hotkeyScaleReset = new QShortcut(Qt::CTRL|Qt::Key_F, this); connect(m_hotkeyScaleReset, SIGNAL(activated()), this, SLOT(resetSize())); connect(aw->m_resetScalingAct, SIGNAL(triggered()), this, SLOT(resetSize())); m_hotkeyExitFullscreen = new QShortcut(Qt::Key_Escape, this); @@ -66,7 +66,7 @@ CaptureWin::CaptureWin(ApplicationWindow *aw) : m_closeWindowAct->setStatusTip("Close"); QList shortcuts; // More standard close window shortcut - shortcuts << Qt::CTRL+Qt::Key_W; + shortcuts << (Qt::CTRL|Qt::Key_W); // Historic qv4l2 shortcut shortcuts << Qt::Key_Q; m_closeWindowAct->setShortcuts(shortcuts); diff --git a/utils/qv4l2/qv4l2.cpp b/utils/qv4l2/qv4l2.cpp index e49a4599..bcba88f5 100644 --- a/utils/qv4l2/qv4l2.cpp +++ b/utils/qv4l2/qv4l2.cpp @@ -132,19 +132,19 @@ ApplicationWindow::ApplicationWindow() : QAction *openAct = new QAction(QIcon(":/fileopen.png"), "&Open Device", this); openAct->setStatusTip("Open a v4l device, use libv4l2 wrapper if possible"); - openAct->setShortcut(Qt::CTRL+Qt::Key_O); + openAct->setShortcut(Qt::CTRL|Qt::Key_O); connect(openAct, SIGNAL(triggered()), this, SLOT(opendev())); QAction *openRawAct = new QAction(QIcon(":/fileopen.png"), "Open &Raw Device", this); openRawAct->setStatusTip("Open a v4l device without using the libv4l2 wrapper"); - openRawAct->setShortcut(Qt::CTRL+Qt::Key_R); + openRawAct->setShortcut(Qt::CTRL|Qt::Key_R); connect(openRawAct, SIGNAL(triggered()), this, SLOT(openrawdev())); m_capStartAct = new QAction(QIcon(":/start.png"), "Start &Capturing", this); m_capStartAct->setStatusTip("Start capturing"); m_capStartAct->setCheckable(true); m_capStartAct->setDisabled(true); - m_capStartAct->setShortcut(Qt::CTRL+Qt::Key_V); + m_capStartAct->setShortcut(Qt::CTRL|Qt::Key_V); connect(m_capStartAct, SIGNAL(toggled(bool)), this, SLOT(capStart(bool))); m_capStepAct = new QAction(QIcon(":/step.png"), "Single Step", this); @@ -169,7 +169,7 @@ ApplicationWindow::ApplicationWindow() : QAction *closeAct = new QAction(QIcon(":/fileclose.png"), "&Close Device", this); closeAct->setStatusTip("Close"); - closeAct->setShortcut(Qt::CTRL+Qt::Key_W); + closeAct->setShortcut(Qt::CTRL|Qt::Key_W); connect(closeAct, SIGNAL(triggered()), this, SLOT(closeDevice())); QAction *traceAct = new QAction("&Trace IOCTLs", this); @@ -179,7 +179,7 @@ ApplicationWindow::ApplicationWindow() : QAction *quitAct = new QAction(QIcon(":/exit.png"), "&Quit", this); quitAct->setStatusTip("Exit the application"); - quitAct->setShortcut(Qt::CTRL+Qt::Key_Q); + quitAct->setShortcut(Qt::CTRL|Qt::Key_Q); connect(quitAct, SIGNAL(triggered()), this, SLOT(close())); QMenu *fileMenu = menuBar()->addMenu("&File"); @@ -209,7 +209,7 @@ ApplicationWindow::ApplicationWindow() : m_resetScalingAct = new QAction("Resize to &Frame Size", this); m_resetScalingAct->setStatusTip("Resizes the capture window to match frame size"); - m_resetScalingAct->setShortcut(Qt::CTRL+Qt::Key_F); + m_resetScalingAct->setShortcut(Qt::CTRL|Qt::Key_F); m_overrideColorspace = -1; QMenu *menu = new QMenu("Override Colorspace");