summaryrefslogtreecommitdiffhomepage
path: root/qxt-mini/qxtglobalshortcut_p.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-11-22 15:23:06 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-11-22 15:23:06 +0100
commit104f23670b7c3c5a1091a45d513b32bf72040a19 (patch)
tree7341d556d25b53c98a2a39b5423d45c5e6c6b1e4 /qxt-mini/qxtglobalshortcut_p.h
parentdb246232e898e9c4b351e80cede0dbea271ca8b8 (diff)
revert qxt changes
Diffstat (limited to 'qxt-mini/qxtglobalshortcut_p.h')
-rw-r--r--qxt-mini/qxtglobalshortcut_p.h28
1 files changed, 1 insertions, 27 deletions
diff --git a/qxt-mini/qxtglobalshortcut_p.h b/qxt-mini/qxtglobalshortcut_p.h
index 5b10d089..407f968e 100644
--- a/qxt-mini/qxtglobalshortcut_p.h
+++ b/qxt-mini/qxtglobalshortcut_p.h
@@ -40,10 +40,6 @@
#include <QAbstractNativeEventFilter>
#endif
-#ifdef Q_OS_DARWIN
-# include <Cocoa/Cocoa.h>
-#endif
-
class QxtGlobalShortcutPrivate : public QxtPrivate<QxtGlobalShortcut>
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
,public QAbstractNativeEventFilter
@@ -62,35 +58,13 @@ public:
bool unsetShortcut();
static bool error;
-#ifndef Q_OS_DARWIN
static int ref;
# if QT_VERSION < QT_VERSION_CHECK(5,0,0)
static QAbstractEventDispatcher::EventFilter prevEventFilter;
- static bool eventFilter(void* message);
# else
+ static bool eventFilter(void* message);
virtual bool nativeEventFilter(const QByteArray & eventType, void * message, long * result);
# endif // QT_VERSION < QT_VERSION_CHECK(5,0,0)
-# else
- virtual bool nativeEventFilter(const QByteArray & eventType, void * message, long * result) {
- EventRef Event = reinterpret_cast<EventRef>(message);
- UInt32 EventClass = GetEventClass (Event);
- UInt32 EventKind = GetEventKind (Event);
- UInt32 eventModifiers = 0;
- GetEventParameter(Event,
- kEventParamKeyModifiers,
- typeUInt32,
- NULL,
- sizeof(UInt32),
- NULL,
- &eventModifiers);
- if (kEventClassKeyboard && EventKind == kEventRawKeyDown)
- {
- UInt32 keyPressed = -1;
- GetEventParameter(Event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyPressed);
- return keyPressed == nativeKeycode(key) && nativeModifiers(mods) == eventModifiers;
- }
- }
-#endif // Q_WS_MAC
static void activateShortcut(quint32 nativeKey, quint32 nativeMods);