summaryrefslogtreecommitdiff
blob: 4fc7242875157d4254aec5f6b6fb7ab7596e57d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
https://dev.gnupg.org/D596

From 762346c5d1877cde6b37b191cd3c2469e1c7ddbb Mon Sep 17 00:00:00 2001
From: Heiko Becker <heiko.becker@kde.org>
Date: Mon, 18 Mar 2024 20:38:09 +0100
Subject: [PATCH] qt5: Add a '5' to adjust defines

They were changed from PINENTRY_QT_FOO to PINENTRY_QT5_FOO in
1e79123c389584b8240387914b193be41b823e92.
--- a/qt5/capslock.cpp
+++ b/qt5/capslock.cpp
@@ -32,7 +32,7 @@
 CapsLockWatcher::Private::Private(CapsLockWatcher *q)
     : q{q}
 {
-#ifdef PINENTRY_QT_WAYLAND
+#ifdef PINENTRY_QT5_WAYLAND
     if (qApp->platformName() == QLatin1String("wayland")) {
         watchWayland();
     }
@@ -44,7 +44,7 @@ CapsLockWatcher::CapsLockWatcher(QObject *parent)
     , d{new Private{this}}
 {
     if (qApp->platformName() == QLatin1String("wayland")) {
-#ifndef PINENTRY_QT_WAYLAND
+#ifndef PINENTRY_QT5_WAYLAND
         qWarning() << "CapsLockWatcher was compiled without support for Wayland";
 #endif
     }
--- a/qt5/capslock_p.h
+++ b/qt5/capslock_p.h
@@ -23,7 +23,7 @@
 
 #include "capslock.h"
 
-#ifdef PINENTRY_QT_WAYLAND
+#ifdef PINENTRY_QT5_WAYLAND
 namespace KWayland
 {
 namespace Client
@@ -38,12 +38,12 @@ class CapsLockWatcher::Private
 {
 public:
     explicit Private(CapsLockWatcher *);
-#ifdef PINENTRY_QT_WAYLAND
+#ifdef PINENTRY_QT5_WAYLAND
     void watchWayland();
 #endif
 
 private:
-#ifdef PINENTRY_QT_WAYLAND
+#ifdef PINENTRY_QT5_WAYLAND
     void registry_seatAnnounced(quint32, quint32);
     void seat_hasKeyboardChanged(bool);
     void keyboard_modifiersChanged(quint32);
@@ -52,7 +52,7 @@ private:
 private:
     CapsLockWatcher *const q;
 
-#ifdef PINENTRY_QT_WAYLAND
+#ifdef PINENTRY_QT5_WAYLAND
     KWayland::Client::Registry *registry = nullptr;
     KWayland::Client::Seat *seat = nullptr;
 #endif
--- a/qt5/capslock_unix.cpp
+++ b/qt5/capslock_unix.cpp
@@ -25,7 +25,7 @@
 #include "capslock.h"
 #include "capslock_p.h"
 
-#ifdef PINENTRY_QT_WAYLAND
+#ifdef PINENTRY_QT5_WAYLAND
 # include <KWayland/Client/connection_thread.h>
 # include <KWayland/Client/keyboard.h>
 # include <KWayland/Client/registry.h>
@@ -34,7 +34,7 @@
 
 #include <QGuiApplication>
 
-#ifdef PINENTRY_QT_X11
+#ifdef PINENTRY_QT5_X11
 # include <QX11Info>
 # include <X11/XKBlib.h>
 # undef Status
@@ -42,25 +42,25 @@
 
 #include <QDebug>
 
-#ifdef PINENTRY_QT_WAYLAND
+#ifdef PINENTRY_QT5_WAYLAND
 using namespace KWayland::Client;
 #endif
 
-#ifdef PINENTRY_QT_WAYLAND
+#ifdef PINENTRY_QT5_WAYLAND
 static bool watchingWayland = false;
 #endif
 
 LockState capsLockState()
 {
     static bool reportUnsupportedPlatform = true;
-#ifdef PINENTRY_QT_X11
+#ifdef PINENTRY_QT5_X11
     if (qApp->platformName() == QLatin1String("xcb")) {
         unsigned int state;
         XkbGetIndicatorState(QX11Info::display(), XkbUseCoreKbd, &state);
         return (state & 0x01) == 1 ? LockState::On : LockState::Off;
     }
 #endif
-#ifdef PINENTRY_QT_WAYLAND
+#ifdef PINENTRY_QT5_WAYLAND
     if (qApp->platformName() == QLatin1String("wayland")) {
         if (!watchingWayland && reportUnsupportedPlatform) {
             qDebug() << "Use CapsLockWatcher for checking for Caps Lock on Wayland";
@@ -74,7 +74,7 @@ LockState capsLockState()
     return LockState::Unknown;
 }
 
-#ifdef PINENTRY_QT_WAYLAND
+#ifdef PINENTRY_QT5_WAYLAND
 void CapsLockWatcher::Private::watchWayland()
 {
     watchingWayland = true;
-- 
2.44.0