From 6e1aa998ea5d2f54c704fdbaad1008bb2472825e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 3 Nov 2013 14:08:11 +0100 Subject: "fix" crapintosh build --- qxt-mini/qxtglobalshortcut.cpp | 12 ++++++------ qxt-mini/qxtglobalshortcut_p.h | 10 ++++++---- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'qxt-mini') diff --git a/qxt-mini/qxtglobalshortcut.cpp b/qxt-mini/qxtglobalshortcut.cpp index 72548d6f..44b9f917 100644 --- a/qxt-mini/qxtglobalshortcut.cpp +++ b/qxt-mini/qxtglobalshortcut.cpp @@ -33,17 +33,17 @@ #include #include -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC int QxtGlobalShortcutPrivate::ref = 0; # if QT_VERSION < QT_VERSION_CHECK(5,0,0) QAbstractEventDispatcher::EventFilter QxtGlobalShortcutPrivate::prevEventFilter = 0; # endif -#endif // Q_WS_MAC +#endif // Q_OS_MAC QHash, QxtGlobalShortcut*> QxtGlobalShortcutPrivate::shortcuts; QxtGlobalShortcutPrivate::QxtGlobalShortcutPrivate() : enabled(true), key(Qt::Key(0)), mods(Qt::NoModifier) { -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC if (ref == 0) { # if QT_VERSION < QT_VERSION_CHECK(5,0,0) prevEventFilter = QAbstractEventDispatcher::instance()->setEventFilter(eventFilter); @@ -52,12 +52,12 @@ QxtGlobalShortcutPrivate::QxtGlobalShortcutPrivate() : enabled(true), key(Qt::Ke #endif } ++ref; -#endif // Q_WS_MAC +#endif // Q_OS_MAC } QxtGlobalShortcutPrivate::~QxtGlobalShortcutPrivate() { -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC --ref; if (ref == 0) { QAbstractEventDispatcher *ed = QAbstractEventDispatcher::instance(); @@ -69,7 +69,7 @@ QxtGlobalShortcutPrivate::~QxtGlobalShortcutPrivate() # endif } } -#endif // Q_WS_MAC +#endif // Q_OS_MAC } bool QxtGlobalShortcutPrivate::setShortcut(const QKeySequence& shortcut) diff --git a/qxt-mini/qxtglobalshortcut_p.h b/qxt-mini/qxtglobalshortcut_p.h index 1a788852..0d88b354 100644 --- a/qxt-mini/qxtglobalshortcut_p.h +++ b/qxt-mini/qxtglobalshortcut_p.h @@ -59,14 +59,16 @@ public: bool unsetShortcut(); static bool error; -#ifndef Q_WS_MAC +#ifndef Q_OS_DARWIN static int ref; -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) +# if QT_VERSION < QT_VERSION_CHECK(5,0,0) static QAbstractEventDispatcher::EventFilter prevEventFilter; static bool eventFilter(void* message); -#else +# else virtual bool nativeEventFilter(const QByteArray & eventType, void * message, long * result); -#endif // QT_VERSION < QT_VERSION_CHECK(5,0,0) +# endif // QT_VERSION < QT_VERSION_CHECK(5,0,0) +# else + virtual bool nativeEventFilter(const QByteArray & eventType, void * message, long * result) {} #endif // Q_WS_MAC static void activateShortcut(quint32 nativeKey, quint32 nativeMods); -- cgit v1.2.3