From patchwork Sat Apr 15 20:10:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 674341 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 1E7BDC77B77 for ; Sat, 15 Apr 2023 20:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229990AbjDOULD (ORCPT ); Sat, 15 Apr 2023 16:11:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbjDOULB (ORCPT ); Sat, 15 Apr 2023 16:11:01 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A9E735B1 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=xfWh7xyVzKjbQqW50oMRPpJ4oOpr7pqIFDjOqTaUwko=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=ipMXMuzXvUsxECMvzacq2gKsH6Y9CYKnbCu4zm5gQAOhxmpUlek+HWcI6KJpLOIcd K5rPBBf/Fpw/idanAKlhl0GIQzgzs5YcEZJ04124w/v+bZUF4fmOg5xjbAYnNqxbOX bl4tUAQtHOy0vobzIjumHsNHX6Zq3YFNtrPlXThXbI+XM2HFzMQEj7Bl1tEv84kpAZ UODdAW500Un1r2ih41afuZxTfPM1kq++D85GFtICyWGKnH5wphuEttR3WvbYSu73wd SEjzx9XpcEzd4/TNB1+FP6ts8Dku483hPXPr9q8h0IB3d1WlDM7+ydLflpY0ZkLuWA Ccl+HUQMCLMIA== 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 1MMofc-1q6XXa08TU-00ImFH for ; Sat, 15 Apr 2023 22:10:58 +0200 From: Peter Seiderer To: linux-media@vger.kernel.org Subject: [PATCH v4l-utils v1 05/11] qv4l2: fix Qt6 compile (QHBoxLayout/QVBoxLayout has no member setMargin) Date: Sat, 15 Apr 2023 22:10:50 +0200 Message-Id: <20230415201056.31080-5-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:KQq7HsJ8BRRlbQsGUVTtxYAh0bX3Mo+t/YhtLZjrH4+0DbHKaxQ 91VfmDfEF8FPmVwc+dwixta9mDJEF5GH5+iJZTt+e6OLqbh4IG/wQ/noQYYEOcw11/H8fjd UsF0l6a96QZMxJw8awKxLivhBhK50PFPyqzGTdOtEm+kY1yQF1eTIFveSGuUSsk3/r7Lixz LpczEi5tdNn/gFCyvOz3w== UI-OutboundReport: notjunk:1;M01:P0:HBgBjr4dIlo=;VKHcOOrZqtC08YYlGfGFkpqOYd9 TlnrcQSkg0ImIpLlPIctOYr7g2fKpTx2hQfiqaBt5Ct5DOXezhN0rgGE2Bh6mefH1vAmv6YYV t3+CvLUtP3VeG2aEzHo0uqp+/p+z/L0q8DDN58IjTbJiI2yAqvTSrT/iB1sO9ySQUPKH9502g peKtJgUR6sL5rbHuN8qAzlak9Nav1+qSOXhBMgO2h2pDyYbTNlJRIBA63+OHHbAoLhc4InYYE SgGhRhBGPxFZkdLTkzvnUPSWFUB7dvFnPUppaYQ0JM/S9ThteTMrNiXVOE9VDb34mP5IuQ3Gr Hwzt5bYWlUSdODiXaRydbnPtlV9cp4dn+TuysK7BuMTKUX8Pp0LvHjANO//q4w/1+hegc/pHR MSzkta8kFu2MeXw0Csr/mGb3/8UFYEHCeOok2osCnRlL4So4XppalwBQnwRGcLMUwP0pCPGi+ IlPEGA1qQTxWo5SjRxfeaCQ2o91tLP91sNFMBHwqtz8UWwRgpXjDcInyjsPN7nMjrnmWczj1n 5wjljOYlsTfYSMXMRboXwUyQa812RwEDbKjaz5qf+v9J8v2pDjPuCjZU2th1ZR5JnfZApRY+K f2u8ef5d83dzrgBDhFFxEXcIcnZe9gj9HYu9mD2jHz5i1Or/FghaWB5CsY7tsVmbxJ1/CUOyf jDlUQ5+JSXDCMR7v/qwvix+A+jb95ogJf+GOqn8NC8VsFLvjmYOdwdrJ4IxobyXdXXXWqwY27 lkJ7HX/WdNjN+P3yrkxzmJKmH/BVJI49X+IWKfhqKWxCykw3MyrpiI1h66H7dFBZl8DgHjPsX ZO7Sv7ZaPMVDE4tNgscIwdE3eIWV6x/KjHBCJe2+x6fI4uYR20BHYeScGVBghZSJDY5bBfUyl ldfeQRr2DuqLxQehjN+pkca918WDYZGmxYjLr9VtA57XZUE30DomlKe7n/ryXkqxlABzWCSDd yDlzDA== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes: ../qv4l2/general-tab.cpp:434:22: error: ‘class QHBoxLayout’ has no member named ‘setMargin’ 434 | box->setMargin(0); | ^~~~~~~~~ ../qv4l2/capture-win.cpp:130:23: error: ‘class QVBoxLayout’ has no member named ‘setMargin’ 130 | m_vboxLayout->setMargin(0); | ^~~~~~~~~ ../qv4l2/ctrl-tab.cpp:255:22: error: ‘class QHBoxLayout’ has no member named ‘setMargin’ 255 | m_boxLayout->setMargin(0); | ^~~~~~~~~ Signed-off-by: Peter Seiderer --- utils/qv4l2/capture-win.cpp | 4 ++++ utils/qv4l2/ctrl-tab.cpp | 4 ++++ utils/qv4l2/general-tab.cpp | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/utils/qv4l2/capture-win.cpp b/utils/qv4l2/capture-win.cpp index 1e3986ad..ef33a91b 100644 --- a/utils/qv4l2/capture-win.cpp +++ b/utils/qv4l2/capture-win.cpp @@ -127,7 +127,11 @@ void CaptureWin::buildWindow(QWidget *videoSurface) int l, t, r, b; m_vboxLayout = new QVBoxLayout(this); m_vboxLayout->getContentsMargins(&l, &t, &r, &b); +#if QT_VERSION < 0x060000 m_vboxLayout->setMargin(0); +#else + m_vboxLayout->setContentsMargins(0, 0, 0, 0); +#endif m_vboxLayout->addWidget(videoSurface, 1000, Qt::AlignCenter); setContextMenuPolicy(Qt::CustomContextMenu); diff --git a/utils/qv4l2/ctrl-tab.cpp b/utils/qv4l2/ctrl-tab.cpp index 67f55546..cfdecdeb 100644 --- a/utils/qv4l2/ctrl-tab.cpp +++ b/utils/qv4l2/ctrl-tab.cpp @@ -252,7 +252,11 @@ void ApplicationWindow::addCtrl(QGridLayout *grid, const v4l2_query_ext_ctrl &qe struct v4l2_querymenu qmenu; QWidget *wContainer = new QWidget(); QHBoxLayout *m_boxLayout = new QHBoxLayout(wContainer); +#if QT_VERSION < 0x060000 m_boxLayout->setMargin(0); +#else + m_boxLayout->setContentsMargins(0, 0, 0, 0); +#endif __u64 dif; switch (qec.type) { diff --git a/utils/qv4l2/general-tab.cpp b/utils/qv4l2/general-tab.cpp index b83ccb67..105c5cde 100644 --- a/utils/qv4l2/general-tab.cpp +++ b/utils/qv4l2/general-tab.cpp @@ -430,8 +430,11 @@ void GeneralTab::inputSection(v4l2_input vin) QLabel *l = new QLabel("Refresh Tuner Status", parentWidget()); QWidget *w = new QWidget(parentWidget()); QHBoxLayout *box = new QHBoxLayout(w); - +#if QT_VERSION < 0x060000 box->setMargin(0); +#else + box->setContentsMargins(0, 0, 0, 0); +#endif m_detectSubchans = new QToolButton(w); m_detectSubchans->setIcon(QIcon(":/enterbutt.png")); m_subchannels = new QLabel("", w);