From a73944bdb4e9019b91ec14bdd3f8861334c2c35c Mon Sep 17 00:00:00 2001 From: Maxime Roussin-Belanger Date: Tue, 11 Jun 2024 14:00:26 -0400 Subject: [PATCH] shellintegration: qwaylandinputpanelshellintegration: migrate for qt6 Upstream-Status: Submitted [https://github.com/maliit/framework/pull/122] --- .../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 a35b7ac..3cfcce9 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 dccf81a..3aefda1 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 +using namespace QtWaylandClient; -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 @@ private: QScopedPointer m_panel; }; -} - -QT_END_NAMESPACE - #endif //QWAYLANDINPUTPANELSHELLINTEGRATION_H