aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-10-07 10:27:50 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-10-07 10:27:55 +0100
commit1b707146717460635bed3559bf97dd17034f224e (patch)
tree2a927e8e844a6572e4283eee8e95dd3fc2a431ca /src
parentec58dfe8f74aca75e47b58c77ba9a9714cf939ca (diff)
parent80761afced12c774a1768fb27a3975d456981ae0 (diff)
Merge bitcoin-core/gui#840: qt6: Handle different signatures of `QANEF::nativeEventFilter`
80761afced12c774a1768fb27a3975d456981ae0 qt6: Handle different signatures of `QANEF::nativeEventFilter` (Hennadii Stepanov) Pull request description: Split from https://github.com/bitcoin/bitcoin/pull/30997. This PR ensures compatibility across all supported Qt versions. For more details, please refer to https://github.com/qt/qtbase/commit/3b38c73c7ffa71c00c172cf0e05742835a304300. No behaviour change. ACKs for top commit: maflcko: lgtm ACK 80761afced12c774a1768fb27a3975d456981ae0 promag: Code review ACK 80761afced12c774a1768fb27a3975d456981ae0. Tree-SHA512: a265e1c33cc7da37003bb0e6fd40950acb5e948ca9ec63a59a79c5e2a1894334f48d5565539c91d4d777b48a589366958df1498eaa6935e3b7fb534493adb51a
Diffstat (limited to 'src')
-rw-r--r--src/qt/winshutdownmonitor.cpp4
-rw-r--r--src/qt/winshutdownmonitor.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/winshutdownmonitor.cpp b/src/qt/winshutdownmonitor.cpp
index 0b5278c192..9ccd7028da 100644
--- a/src/qt/winshutdownmonitor.cpp
+++ b/src/qt/winshutdownmonitor.cpp
@@ -12,7 +12,11 @@
// If we don't want a message to be processed by Qt, return true and set result to
// the value that the window procedure should return. Otherwise return false.
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType, void *pMessage, qintptr *pnResult)
+#else
bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType, void *pMessage, long *pnResult)
+#endif
{
Q_UNUSED(eventType);
diff --git a/src/qt/winshutdownmonitor.h b/src/qt/winshutdownmonitor.h
index 060d8546e3..a8b626065d 100644
--- a/src/qt/winshutdownmonitor.h
+++ b/src/qt/winshutdownmonitor.h
@@ -20,7 +20,11 @@ public:
WinShutdownMonitor(std::function<void()> shutdown_fn) : m_shutdown_fn{std::move(shutdown_fn)} {}
/** Implements QAbstractNativeEventFilter interface for processing Windows messages */
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+ bool nativeEventFilter(const QByteArray &eventType, void *pMessage, qintptr *pnResult) override;
+#else
bool nativeEventFilter(const QByteArray &eventType, void *pMessage, long *pnResult) override;
+#endif
/** Register the reason for blocking shutdown on Windows to allow clean client exit */
static void registerShutdownBlockReason(const QString& strReason, const HWND& mainWinId);