Files
meta-kde/recipes-support/maliit-framework-qt6/0003-shellintegration-qwaylandinputpanelshellintegration-.patch
2024-06-16 22:56:23 -04:00

102 lines
3.4 KiB
Diff

From a73944bdb4e9019b91ec14bdd3f8861334c2c35c Mon Sep 17 00:00:00 2001
From: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com>
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 <QtWaylandClient/private/qwaylandshellintegration_p.h>
-
#include "qwayland-input-method-unstable-v1.h"
+#include <QtWaylandClient/private/qwayland-text-input-unstable-v1.h>
+#include <QtWaylandClient/private/qwaylandclientshellapi_p.h>
-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<QtWayland::zwp_input_panel_v1> m_panel;
};
-}
-
-QT_END_NAMESPACE
-
#endif //QWAYLANDINPUTPANELSHELLINTEGRATION_H