{"id":19439,"url":"https://patchwork.libcamera.org/api/1.1/patches/19439/?format=json","web_url":"https://patchwork.libcamera.org/patch/19439/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240121224052.1049989-2-neal@gompa.dev>","date":"2024-01-21T22:39:53","name":"[libcamera-devel,v2,1/3] apps: qcam: Port to Qt 6","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"29a89e1cf260804d7d37b319b14bb2434d631ab4","submitter":{"id":181,"url":"https://patchwork.libcamera.org/api/1.1/people/181/?format=json","name":"Neal Gompa","email":"neal@gompa.dev"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/19439/mbox/","series":[{"id":4151,"url":"https://patchwork.libcamera.org/api/1.1/series/4151/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4151","date":"2024-01-21T22:39:52","name":"apps: qcam: Port to Qt 6","version":2,"mbox":"https://patchwork.libcamera.org/series/4151/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/19439/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/19439/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 08026BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 21 Jan 2024 22:41:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9372E62945;\n\tSun, 21 Jan 2024 23:41:20 +0100 (CET)","from mail-ot1-f47.google.com (mail-ot1-f47.google.com\n\t[209.85.210.47])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 111CD628B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 21 Jan 2024 23:41:18 +0100 (CET)","by mail-ot1-f47.google.com with SMTP id\n\t46e09a7af769-6dbcebaf9a9so1504010a34.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 21 Jan 2024 14:41:17 -0800 (PST)","from Belldandy-Slimbook.infra.opensuse.org ([32.220.181.243])\n\tby smtp.gmail.com with ESMTPSA id\n\te2-20020ac84b42000000b0042a233d21c2sm1930112qts.80.2024.01.21.14.41.13\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 21 Jan 2024 14:41:14 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1705876880;\n\tbh=s1q6g5YigLm9uvXy8ZyvaxXsaLmDWjtUXFxxeflmsF8=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=tTOimVt74zkeuVrrVI2mxth/u48P9eCho8ahf8Eay9ibtXeVDKRfbXPB8AtcD0BFK\n\taVvEcEDZYW+kDl57CsQI37FnVsjj1CVY7zvfaQkie2OFTxNLpMzlfGbVgyriRT/YgU\n\tvdJKW5CMPSss7JUzytnXczF18EUVHUomsmAUBvo1/RKdb4MAf+1OQa+lv7/F6cWJ4Z\n\t0GaL5RN0yOE9AiqCdhwGSC/VBS/kmFqMfdqiOEETIXAP3hmV/yArliiYKYb7kKlB8/\n\tgwsUzFG5J9G2bN2ot/UtKT92tI10Eu9lBFo4Z3xhLt2vGzXdnmWrxYAEw2qOtnTzkQ\n\tSZjFIY3uqkA0w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1705876876; x=1706481676;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=jluHLwDS2gugrqvJ7nUpCu5D5BRpYUpBGRVQPffURUU=;\n\tb=S5sPUj+V9Y2M8LkN0Fm4Jru8gzY7KvFCnSVvPAPNv/wMKywPULOOhL3hMZz+IdURH7\n\tBPmf2vpHXGSTHYqZALVldzilAQX8bZp84cmw2JMD46yI5mn1D72VUlaHxf/dfN8M93FF\n\tifSSyjtdkJRKvy8nMky5mCQl+fk32W/hW08K6H/Jr5mKetBkiMAJnUvxdRkIQNmPSSXo\n\tPfb2aN12mNELs7+coCfNHfpCbPA3Cyw0wQk4yq7fqdwejt7Xnvv3z3pe/yNCCnbBcYaB\n\tSChJOOCQOb4kwGeu6Vitx6YqNELL0zWJRVBS3uqW8e6tOJKyFL5h6orRlCIqHhdfZeeI\n\t7cnA==","X-Gm-Message-State":"AOJu0YxxF4zigrsmIZoonJJ4n6Enk88dgGQly5qpEVbvBLF/Hc4x0m+6\n\tR9+DkKUt7KoZMTjbTGAh81d4APy5zTp1jGHwEQFA255M1bWl4qiNaWhs2XxxfNq4Yw==","X-Google-Smtp-Source":"AGHT+IHWXygeVHQE6nYgDxpc+tC/kl9MkKVcEz094qbnLj5Twd7K0Y1nMJk2tfa2O/mSn/3EqgXzcg==","X-Received":"by 2002:a05:6830:3288:b0:6dc:8656:ae45 with SMTP id\n\tm8-20020a056830328800b006dc8656ae45mr2453541ott.33.1705876875705; \n\tSun, 21 Jan 2024 14:41:15 -0800 (PST)","To":"libcamera-devel <libcamera-devel@lists.libcamera.org>","Date":"Sun, 21 Jan 2024 17:39:53 -0500","Message-ID":"<20240121224052.1049989-2-neal@gompa.dev>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20240121224052.1049989-1-neal@gompa.dev>","References":"<20240121224052.1049989-1-neal@gompa.dev>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 1/3] apps: qcam: Port to Qt 6","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Neal Gompa via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Neal Gompa <neal@gompa.dev>","Cc":"Wim Taymans <wtaymans@redhat.com>, Neal Gompa <neal@gompa.dev>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Open source Qt 5 has been effectively end of life since the release\nof Qt 6, and Qt 6 has current LTS releases now.\n\nThis change ports qcam to Qt 6.2 and drops some of the baggage related\nto Qt 5 that is no longer applicable.\n\nSigned-off-by: Neal Gompa <neal@gompa.dev>\n---\n README.rst                |  2 +-\n meson.build               |  2 +-\n src/apps/qcam/meson.build | 45 +++++++++++----------------------------\n 3 files changed, 15 insertions(+), 34 deletions(-)","diff":"diff --git a/README.rst b/README.rst\nindex 315738ee..6f1c9302 100644\n--- a/README.rst\n+++ b/README.rst\n@@ -88,7 +88,7 @@ for cam: [optional]\n         - libsdl2-dev: Enables the SDL sink\n \n for qcam: [optional]\n-        libtiff-dev qtbase5-dev qttools5-dev-tools\n+        libtiff-dev qt6-base-dev qt6-tools-dev-tools\n \n for tracing with lttng: [optional]\n         liblttng-ust-dev python3-jinja2 lttng-tools\ndiff --git a/meson.build b/meson.build\nindex cb6b666a..4c315e2a 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -1,7 +1,7 @@\n # SPDX-License-Identifier: CC0-1.0\n \n project('libcamera', 'c', 'cpp',\n-    meson_version : '>= 0.60',\n+    meson_version : '>= 0.63',\n     version : '0.2.0',\n     default_options : [\n         'werror=true',\ndiff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build\nindex 6cf4c171..c7fcfbeb 100644\n--- a/src/apps/qcam/meson.build\n+++ b/src/apps/qcam/meson.build\n@@ -1,13 +1,13 @@\n # SPDX-License-Identifier: CC0-1.0\n \n-qt5 = import('qt5')\n-qt5_dep = dependency('qt5',\n+qt6 = import('qt6')\n+qt6_dep = dependency('qt6',\n                      method : 'pkg-config',\n-                     modules : ['Core', 'Gui', 'Widgets'],\n+                     modules : ['Core', 'Gui', 'OpenGL', 'OpenGLWidgets', 'Widgets'],\n                      required : get_option('qcam'),\n-                     version : '>=5.4')\n+                     version : '>=6.2')\n \n-if not qt5_dep.found()\n+if not qt6_dep.found()\n     qcam_enabled = false\n     subdir_done()\n endif\n@@ -20,46 +20,27 @@ qcam_sources = files([\n     'main.cpp',\n     'main_window.cpp',\n     'message_handler.cpp',\n+    'viewfinder_gl.cpp',\n     'viewfinder_qt.cpp',\n ])\n \n qcam_moc_headers = files([\n     'cam_select_dialog.h',\n     'main_window.h',\n+    'viewfinder_gl.h',\n     'viewfinder_qt.h',\n ])\n \n qcam_resources = files([\n     'assets/feathericons/feathericons.qrc',\n+    'assets/shader/shaders.qrc',\n ])\n \n-qt5_cpp_args = [apps_cpp_args, '-DQT_NO_KEYWORDS']\n+qt6_cpp_args = [apps_cpp_args, '-DQT_NO_KEYWORDS']\n \n-if cxx.has_header_symbol('QOpenGLWidget', 'QOpenGLWidget',\n-                         dependencies : qt5_dep, args : '-fPIC')\n-    qcam_sources += files([\n-        'viewfinder_gl.cpp',\n-    ])\n-    qcam_moc_headers += files([\n-        'viewfinder_gl.h',\n-    ])\n-    qcam_resources += files([\n-        'assets/shader/shaders.qrc'\n-    ])\n-endif\n-\n-# gcc 9 introduced a deprecated-copy warning that is triggered by Qt until\n-# Qt 5.13. clang 10 introduced the same warning, but detects more issues\n-# that are not fixed in Qt yet. Disable the warning manually in both cases.\n-if ((cc.get_id() == 'gcc' and cc.version().version_compare('>=9.0') and\n-     qt5_dep.version().version_compare('<5.13')) or\n-    (cc.get_id() == 'clang' and cc.version().version_compare('>=10.0')))\n-    qt5_cpp_args += ['-Wno-deprecated-copy']\n-endif\n-\n-resources = qt5.preprocess(moc_headers : qcam_moc_headers,\n+resources = qt6.preprocess(moc_headers : qcam_moc_headers,\n                            qresources : qcam_resources,\n-                           dependencies : qt5_dep)\n+                           dependencies : qt6_dep)\n \n qcam  = executable('qcam', qcam_sources, resources,\n                    install : true,\n@@ -69,6 +50,6 @@ qcam  = executable('qcam', qcam_sources, resources,\n                        libatomic,\n                        libcamera_public,\n                        libtiff,\n-                       qt5_dep,\n+                       qt6_dep,\n                    ],\n-                   cpp_args : qt5_cpp_args)\n+                   cpp_args : qt6_cpp_args)\n","prefixes":["libcamera-devel","v2","1/3"]}