summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/pinentry/files/pinentry-1.3.0-ifdef-qt.patch')
-rw-r--r--app-crypt/pinentry/files/pinentry-1.3.0-ifdef-qt.patch125
1 files changed, 125 insertions, 0 deletions
diff --git a/app-crypt/pinentry/files/pinentry-1.3.0-ifdef-qt.patch b/app-crypt/pinentry/files/pinentry-1.3.0-ifdef-qt.patch
new file mode 100644
index 000000000000..4fc724287515
--- /dev/null
+++ b/app-crypt/pinentry/files/pinentry-1.3.0-ifdef-qt.patch
@@ -0,0 +1,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