aboutsummaryrefslogtreecommitdiffstats
path: root/src/winextras/qwineventfilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/winextras/qwineventfilter.cpp')
-rw-r--r--src/winextras/qwineventfilter.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/winextras/qwineventfilter.cpp b/src/winextras/qwineventfilter.cpp
index be9add4..4b88f54 100644
--- a/src/winextras/qwineventfilter.cpp
+++ b/src/winextras/qwineventfilter.cpp
@@ -51,7 +51,7 @@
# define WM_DWMCOMPOSITIONCHANGED 0x031E
#endif
-QWinEventFilter *QWinEventFilter::instance = 0;
+QWinEventFilter *QWinEventFilter::instance = nullptr;
QWinEventFilter::QWinEventFilter() :
tbButtonCreatedMsgId(RegisterWindowMessageW(L"TaskbarButtonCreated"))
@@ -60,16 +60,20 @@ QWinEventFilter::QWinEventFilter() :
QWinEventFilter::~QWinEventFilter()
{
- instance = 0;
+ instance = nullptr;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+bool QWinEventFilter::nativeEventFilter(const QByteArray &, void *message, qintptr *result)
+#else
bool QWinEventFilter::nativeEventFilter(const QByteArray &, void *message, long *result)
+#endif
{
MSG *msg = static_cast<MSG *>(message);
bool filterOut = false;
- QEvent *event = 0;
- QWindow *window = 0;
+ QEvent *event = nullptr;
+ QWindow *window = nullptr;
switch (msg->message) {
case WM_DWMCOLORIZATIONCOLORCHANGED :
event = new QWinColorizationChangeEvent(QRgb(msg->wParam), msg->lParam);