From 39c3f01885bac0077e587fa72038d90330b47467 Mon Sep 17 00:00:00 2001 From: Maxime Roussin-Belanger Date: Tue, 11 Jun 2024 14:00:25 -0400 Subject: [PATCH 1/3] common: namespace: add missing include QList Otherwise Q_DECLARE_METATYPE can't see the QList type and complains about incomplete type --- common/maliit/namespace.h | 1 + 1 file changed, 1 insertion(+) diff --git a/common/maliit/namespace.h b/common/maliit/namespace.h index 2e47b176..a4f27507 100644 --- a/common/maliit/namespace.h +++ b/common/maliit/namespace.h @@ -16,6 +16,7 @@ #include #include +#include //! \ingroup common namespace Maliit { From b84e0823c9936b3e140829abd2da912450ec6e04 Mon Sep 17 00:00:00 2001 From: Maxime Roussin-Belanger Date: Tue, 11 Jun 2024 14:00:25 -0400 Subject: [PATCH 2/3] maliitpluginsconfig: fix for qt6 --- CMakeLists.txt | 4 +++- src/MaliitPluginsConfig.cmake.in | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bdfcfd0b..5d3bf27a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,9 +35,11 @@ endif() if(Qt6_FOUND) set(QT_VERSION_MAJOR 6) + set(QT_MIN_VERSION "6.0.0") else() find_package(Qt5 REQUIRED COMPONENTS Core DBus Gui Quick) set(QT_VERSION_MAJOR 5) + set(QT_MIN_VERSION "5.14") endif() if(NOT DEFINED QT_PLUGINS_INSTALL_DIR) @@ -54,7 +56,7 @@ if(enable-wayland) if (Qt6_FOUND) find_package(Qt6 REQUIRED COMPONENTS WaylandClient WaylandGlobalPrivate) else() - find_package(Qt5 5.14 REQUIRED COMPONENTS WaylandClient XkbCommonSupport) + find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS WaylandClient XkbCommonSupport) endif() find_package(WaylandProtocols REQUIRED PRIVATE) find_package(QtWaylandScanner REQUIRED) diff --git a/src/MaliitPluginsConfig.cmake.in b/src/MaliitPluginsConfig.cmake.in index e9178da4..f3c9c3c0 100644 --- a/src/MaliitPluginsConfig.cmake.in +++ b/src/MaliitPluginsConfig.cmake.in @@ -1,7 +1,7 @@ include(CMakeFindDependencyMacro) -find_dependency(Qt5Core @Qt5Core_VERSION@) -find_dependency(Qt5Gui @Qt5Gui_VERSION@) -find_dependency(Qt5Quick @Qt5Quick_VERSION@) +find_dependency(Qt@QT_VERSION_MAJOR@Core @QT_MIN_VERSION@) +find_dependency(Qt@QT_VERSION_MAJOR@Gui @QT_MIN_VERSION@) +find_dependency(Qt@QT_VERSION_MAJOR@Quick @QT_MIN_VERSION@) -include("${CMAKE_CURRENT_LIST_DIR}/MaliitPluginsTargets.cmake") \ No newline at end of file +include("${CMAKE_CURRENT_LIST_DIR}/MaliitPluginsTargets.cmake") From d120259eeed1c3d52130f67de74ca62fef6bb838 Mon Sep 17 00:00:00 2001 From: Maxime Roussin-Belanger Date: Tue, 11 Jun 2024 14:00:26 -0400 Subject: [PATCH 3/3] shellintegration: qwaylandinputpanelshellintegration: migrate for qt6 --- .../qwaylandinputpanelshellintegration.cpp | 17 +++------------ .../qwaylandinputpanelshellintegration.h | 21 +++++++------------ 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/src/qt/plugins/shellintegration/qwaylandinputpanelshellintegration.cpp b/src/qt/plugins/shellintegration/qwaylandinputpanelshellintegration.cpp index a35b7ac7..3cfcce9e 100644 --- a/src/qt/plugins/shellintegration/qwaylandinputpanelshellintegration.cpp +++ b/src/qt/plugins/shellintegration/qwaylandinputpanelshellintegration.cpp @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2017 Jan Arne Petersen * * This library is free software; you can redistribute it and/or @@ -14,15 +14,8 @@ #include "qwaylandinputpanelsurface.h" -QT_BEGIN_NAMESPACE - -namespace QtWaylandClient -{ - QWaylandInputPanelShellIntegration::QWaylandInputPanelShellIntegration() - : QWaylandShellIntegration() -{ -} + : QWaylandShellIntegrationTemplate(1) {} QWaylandInputPanelShellIntegration::~QWaylandInputPanelShellIntegration() { @@ -30,7 +23,7 @@ QWaylandInputPanelShellIntegration::~QWaylandInputPanelShellIntegration() bool QWaylandInputPanelShellIntegration::initialize(QWaylandDisplay *display) { - auto result = QWaylandShellIntegration::initialize(display); + auto result = QWaylandShellIntegrationTemplate::initialize(display); const auto globals = display->globals(); for (auto global: globals) { if (global.interface == QLatin1String("zwp_input_panel_v1")) { @@ -48,7 +41,3 @@ QWaylandInputPanelShellIntegration::createShellSurface(QWaylandWindow *window) return new QWaylandInputPanelSurface(ip_surface, window); } - -} - -QT_END_NAMESPACE \ No newline at end of file diff --git a/src/qt/plugins/shellintegration/qwaylandinputpanelshellintegration.h b/src/qt/plugins/shellintegration/qwaylandinputpanelshellintegration.h index dccf81ae..3aefda1e 100644 --- a/src/qt/plugins/shellintegration/qwaylandinputpanelshellintegration.h +++ b/src/qt/plugins/shellintegration/qwaylandinputpanelshellintegration.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2017 Jan Arne Petersen * * This library is free software; you can redistribute it and/or @@ -11,17 +11,16 @@ #ifndef QWAYLANDINPUTPANELSHELLINTEGRATION_H #define QWAYLANDINPUTPANELSHELLINTEGRATION_H -#include - #include "qwayland-input-method-unstable-v1.h" +#include +#include -QT_BEGIN_NAMESPACE - -namespace QtWaylandClient -{ +using namespace QtWaylandClient; -class QWaylandInputPanelShellIntegration: public QWaylandShellIntegration -{ +class QWaylandInputPanelShellIntegration + : public QWaylandShellIntegrationTemplate< + QWaylandInputPanelShellIntegration>, + public QtWayland::zwp_text_input_manager_v1 { public: QWaylandInputPanelShellIntegration(); ~QWaylandInputPanelShellIntegration() override; @@ -33,8 +32,4 @@ class QWaylandInputPanelShellIntegration: public QWaylandShellIntegration QScopedPointer m_panel; }; -} - -QT_END_NAMESPACE - #endif //QWAYLANDINPUTPANELSHELLINTEGRATION_H