mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
qt6: Handle different signatures of QANEF::nativeEventFilter
This change ensures compatibility across all supported Qt versions.
This commit is contained in:
parent
51c698161b
commit
80761afced
2 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue