From patchwork Sat Apr 15 20:10:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 674340 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 E44A0C77B78 for ; Sat, 15 Apr 2023 20:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbjDOULE (ORCPT ); Sat, 15 Apr 2023 16:11:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229853AbjDOULB (ORCPT ); Sat, 15 Apr 2023 16:11:01 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16D3C3AAE for ; Sat, 15 Apr 2023 13:10:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1681589458; i=ps.report@gmx.net; bh=cxjIsTRxd7rpfE2B6wNkw+zVQyLmAhhqgcITcoNqFO8=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=Vh2k/2bOjMxwP/IDxkKTCVymZqxvjBMjbLYtBN7hPX/5N6nn+m44dpvH9XbB7M3pU LouGgHY5R5OOd7Qfxh8UE1CQJ+eNQn5WRXQApQyAXH7Fta2Tr4CK3/yPi97t7Misqi lFBY3B7x/lU/kOtb1f2cZFF3+Qe+A9C/jjJnsXYpzDSbgUtrsId/MTPrfYIncZpEyf U7RPo+24wkyn4c3nx54I1DU2myEFONOnQVNVKjB2Zj4vM5vhpDhq51iBhErl7nfDyy BlEWUWn+ZHjeuUYPflwaWLx6DYs7i7bIwYNKKuFTrirtPW0wqpEQx6x+yVDPmjqlzr XI4HvKInykabw== 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 1McpNy-1qMZ1M0qyg-00ZttF for ; Sat, 15 Apr 2023 22:10:58 +0200 From: Peter Seiderer To: linux-media@vger.kernel.org Subject: [PATCH v4l-utils v1 06/11] qv4l2: fix Qt6 compile (ambiguous overload for operator!=) Date: Sat, 15 Apr 2023 22:10:51 +0200 Message-Id: <20230415201056.31080-6-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:IyHhUS4+u6vjnJYSbRd2iw+cZuZ4BzNfBGEbPMLGrInD8DQvH8v ajH6IggOmrnrFeQaDiRbTy8XDXcHrDhuU0xFiQtfH9jmO+pOFwET7ys4rnOwFO0Z7Az82i7 lMtO8R6eFOxf9odtaTXt2KMsSyMjX4CbLlxbkNZ4oLPcSvCW+luGKf34MTU0Fl9n0GTF/eo KAkIG4ZfEx3TFMuA5XYiw== UI-OutboundReport: notjunk:1;M01:P0:mzCf3ixH5Ko=;YcfHx7uEb401NKLtCg6dqcoz5O6 vSMxazU7b7hcfmwCHQ9Zl3YbIkvdNrtRa+ue+MWQpUFkjek5D4Lnzj/sCqykoXP7wxuay/Vh+ Em3No49qtxvs24lvfkhDr8vfmwuOFaYzHpHhVETwiYsSGLxKYZqIZr1trsCkAyy1d/R3el1e/ 846BWHFqeZeHyFTgJcTmHb7vmG9TbL1jHOvifUrWtN9lRoxWOlVpJF7kM424RGm+No8xyjLHz KcgC8Tprn75F/d9mQyUYG18Ey2I2jSQwpZi/gyF/Nl46+uuPc5tCxPCseNSjHqd8aGMRA7odM Bk4aG/6nHXrBF9BcAOUyE13J9YIfQmZwmLn1Ss6uZSLb5CUe5USRVzeGeByy/scWQoFWY3509 38YXEmIxJxMzTBkWQfcPjdEUAlRjthz8lPNHLPlHCxVlqn0KHgfIiRalezlVJYupDXSBU/Hjh E6+ruP7uTljimIUwS6QKoKhTJEiLEvOKDyebLMlZz1vnjFX3BgZYbylPn7sy6OR5nltMdx7GY wxrUoh3YMwkZTQ6EQoAc9TLVZFJ1o/z9vmhRhGqzfTFLmiCuaVm+n6KkCN6Ieyy2X5Pf8Jqwz xTSMwKsAZftmI3BjHLau782xhmr8CL/kevDWqHnYqb1RDMw1MjjBOke7aIPR/KWJEi+jWsRIT l/XRxXplegnGaUbSEMgvc02tU3RhQ9TWTBRVtKt3+1qD0vqxY4OuxScq7zjhNqpKl7ZqZ3cTv SyuyjuiSAmfi1DbQO7cDR0/TnSOe3M1o94kCr7LwCVQ7QunTiQsJKl1+cZ0HovIngS0toHpmC ZXGg+rZbu0jcaBvp6R6ruKA14J/62jYW4kIcwuoDAmYKGzdMeK23Sx3bE2RJnWPvdgOFVQRPx 9oVUvdr/3zxho8Buhkdp7Fp/htVBGWs/VAslbJAdpZnpGWLd6CtirgCiocOlktZAuvwy5b3z/ qtZgXBQoYUBIajfFTCdsat2rez0= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes: ../qv4l2/general-tab.cpp:1113:57: error: ambiguous overload for ‘operator!=’ (operand types are ‘QString’ and ‘long int’) 1113 | m_audioOutDevice->setEnabled(getAudioInDevice() != NULL ? getAudioInDevice().compare("None") : false); | ^ ../qv4l2/qv4l2.cpp:1261:19: error: ambiguous overload for ‘operator!=’ (operand types are ‘QString’ and ‘long int’) 1261 | if (audIn != NULL && audOut != NULL && audIn.compare("None") && audIn.compare(audOut) != 0) { | ^ ../qv4l2/qv4l2.cpp:1912:26: error: ambiguous overload for ‘operator!=’ (operand types are ‘QString’ and ‘long int’) 1912 | if (video_device != NULL) | ^ ../qv4l2/qv4l2.cpp:1914:29: error: ambiguous overload for ‘operator!=’ (operand types are ‘QString’ and ‘long int’) 1914 | else if (vbi_device != NULL) | ^ ../qv4l2/qv4l2.cpp:1916:31: error: ambiguous overload for ‘operator!=’ (operand types are ‘QString’ and ‘long int’) 1916 | else if (radio_device != NULL) | ^ ../qv4l2/qv4l2.cpp:1918:29: error: ambiguous overload for ‘operator!=’ (operand types are ‘QString’ and ‘long int’) 1918 | else if (sdr_device != NULL) | ^ Signed-off-by: Peter Seiderer --- utils/qv4l2/general-tab.cpp | 2 +- utils/qv4l2/qv4l2.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/qv4l2/general-tab.cpp b/utils/qv4l2/general-tab.cpp index 105c5cde..8bb03b59 100644 --- a/utils/qv4l2/general-tab.cpp +++ b/utils/qv4l2/general-tab.cpp @@ -1110,7 +1110,7 @@ bool GeneralTab::createAudioDeviceList() void GeneralTab::changeAudioDevice() { - m_audioOutDevice->setEnabled(getAudioInDevice() != NULL ? getAudioInDevice().compare("None") : false); + m_audioOutDevice->setEnabled(getAudioInDevice() != nullptr ? getAudioInDevice().compare("None") : false); emit audioDeviceChanged(); } diff --git a/utils/qv4l2/qv4l2.cpp b/utils/qv4l2/qv4l2.cpp index ea1ac201..e24bef13 100644 --- a/utils/qv4l2/qv4l2.cpp +++ b/utils/qv4l2/qv4l2.cpp @@ -1258,7 +1258,7 @@ void ApplicationWindow::startAudio() QString audIn = m_genTab->getAudioInDevice(); QString audOut = m_genTab->getAudioOutDevice(); - if (audIn != NULL && audOut != NULL && audIn.compare("None") && audIn.compare(audOut) != 0) { + if (audIn != nullptr && audOut != nullptr && audIn.compare("None") && audIn.compare(audOut) != 0) { alsa_thread_startup(audOut.toLatin1().data(), audIn.toLatin1().data(), m_genTab->getAudioDeviceBufferSize(), NULL, 0); @@ -1909,13 +1909,13 @@ int main(int argc, char **argv) } } - if (video_device != NULL) + if (video_device != nullptr) device = getDeviceName("/dev/video", video_device); - else if (vbi_device != NULL) + else if (vbi_device != nullptr) device = getDeviceName("/dev/vbi", vbi_device); - else if (radio_device != NULL) + else if (radio_device != nullptr) device = getDeviceName("/dev/radio", radio_device); - else if (sdr_device != NULL) + else if (sdr_device != nullptr) device = getDeviceName("/dev/swradio", sdr_device); else device = "/dev/video0";