File tree Expand file tree Collapse file tree 6 files changed +13
-11
lines changed Expand file tree Collapse file tree 6 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -366,7 +366,7 @@ bool QHotkey::NativeShortcut::operator !=(QHotkey::NativeShortcut other) const
366
366
valid != other.valid ;
367
367
}
368
368
369
- uint qHash (QHotkey::NativeShortcut key)
369
+ QHOTKEY_HASH_SEED qHash (QHotkey::NativeShortcut key)
370
370
{
371
371
return qHash (key.key ) ^ qHash (key.modifier );
372
372
}
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public slots:
120
120
bool _registered;
121
121
};
122
122
123
- uint QHOTKEY_SHARED_EXPORT qHash (QHotkey::NativeShortcut key);
123
+ QHOTKEY_HASH_SEED QHOTKEY_SHARED_EXPORT qHash (QHotkey::NativeShortcut key);
124
124
QHOTKEY_HASH_SEED QHOTKEY_SHARED_EXPORT qHash (QHotkey::NativeShortcut key, QHOTKEY_HASH_SEED seed);
125
125
126
126
QHOTKEY_SHARED_EXPORT Q_DECLARE_LOGGING_CATEGORY (logQHotkey)
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ class QHotkeyPrivateMac : public QHotkeyPrivate
7
7
{
8
8
public:
9
9
// QAbstractNativeEventFilter interface
10
- bool nativeEventFilter (const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE ;
10
+ bool nativeEventFilter (const QByteArray &eventType, void *message, _NATIVE_EVENT_RESULT *result) override ;
11
11
12
12
static OSStatus hotkeyPressEventHandler (EventHandlerCallRef nextHandler, EventRef event, void * data);
13
13
static OSStatus hotkeyReleaseEventHandler (EventHandlerCallRef nextHandler, EventRef event, void * data);
@@ -33,7 +33,7 @@ bool QHotkeyPrivate::isPlatformSupported()
33
33
bool QHotkeyPrivateMac::isHotkeyHandlerRegistered = false ;
34
34
QHash<QHotkey::NativeShortcut, EventHotKeyRef> QHotkeyPrivateMac::hotkeyRefs;
35
35
36
- bool QHotkeyPrivateMac::nativeEventFilter (const QByteArray &eventType, void *message, long *result)
36
+ bool QHotkeyPrivateMac::nativeEventFilter (const QByteArray &eventType, void *message, _NATIVE_EVENT_RESULT *result)
37
37
{
38
38
Q_UNUSED (eventType)
39
39
Q_UNUSED (message)
@@ -288,4 +288,4 @@ OSStatus QHotkeyPrivateMac::hotkeyReleaseEventHandler(EventHandlerCallRef nextHa
288
288
}
289
289
290
290
return noErr;
291
- }
291
+ }
Original file line number Diff line number Diff line change 7
7
#include < QMutex>
8
8
#include < QGlobalStatic>
9
9
10
+ #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
11
+ #define _NATIVE_EVENT_RESULT qintptr
12
+ #else
13
+ #define _NATIVE_EVENT_RESULT long
14
+ #endif
15
+
10
16
class QHOTKEY_SHARED_EXPORT QHotkeyPrivate : public QObject, public QAbstractNativeEventFilter
11
17
{
12
18
Q_OBJECT
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class QHotkeyPrivateWin : public QHotkeyPrivate
15
15
public:
16
16
QHotkeyPrivateWin ();
17
17
// QAbstractNativeEventFilter interface
18
- bool nativeEventFilter (const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE ;
18
+ bool nativeEventFilter (const QByteArray &eventType, void *message, _NATIVE_EVENT_RESULT *result) override ;
19
19
20
20
protected:
21
21
void pollForHotkeyRelease ();
@@ -42,7 +42,7 @@ bool QHotkeyPrivate::isPlatformSupported()
42
42
return true ;
43
43
}
44
44
45
- bool QHotkeyPrivateWin::nativeEventFilter (const QByteArray &eventType, void *message, long *result)
45
+ bool QHotkeyPrivateWin::nativeEventFilter (const QByteArray &eventType, void *message, _NATIVE_EVENT_RESULT *result)
46
46
{
47
47
Q_UNUSED (eventType)
48
48
Q_UNUSED (result)
Original file line number Diff line number Diff line change 3
3
4
4
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
5
5
#include < QGuiApplication>
6
-
7
- #define _NATIVE_EVENT_RESULT qintptr
8
6
#else
9
7
#include < QDebug>
10
8
#include < QX11Info>
11
-
12
- #define _NATIVE_EVENT_RESULT long
13
9
#endif
14
10
15
11
#include < QThreadStorage>
You can’t perform that action at this time.
0 commit comments