summaryrefslogtreecommitdiffhomepage
path: root/qxt-mini/qxtglobalshortcut.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-25 11:24:20 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-25 14:19:59 +0100
commit81362834a78f1ab87c0c8d6331e759199d33623b (patch)
treeed95a41d874d756a06382634f737344661603687 /qxt-mini/qxtglobalshortcut.cpp
parent9ad579e6581cd95edb156cb758cbd329779aecd7 (diff)
qxt: remove ifdefs for Qt4. We're not using it again.
Diffstat (limited to 'qxt-mini/qxtglobalshortcut.cpp')
-rw-r--r--qxt-mini/qxtglobalshortcut.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/qxt-mini/qxtglobalshortcut.cpp b/qxt-mini/qxtglobalshortcut.cpp
index 45576d37..f0a020ff 100644
--- a/qxt-mini/qxtglobalshortcut.cpp
+++ b/qxt-mini/qxtglobalshortcut.cpp
@@ -35,9 +35,6 @@
#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_OS_MAC
QHash<QPair<quint32, quint32>, QxtGlobalShortcut*> QxtGlobalShortcutPrivate::shortcuts;
@@ -45,11 +42,7 @@ QxtGlobalShortcutPrivate::QxtGlobalShortcutPrivate() : enabled(true), key(Qt::Ke
{
#ifndef Q_OS_MAC
if (ref == 0) {
-# if QT_VERSION < QT_VERSION_CHECK(5,0,0)
- prevEventFilter = QAbstractEventDispatcher::instance()->setEventFilter(eventFilter);
-# else
QAbstractEventDispatcher::instance()->installNativeEventFilter(this);
-#endif
}
++ref;
#endif // Q_OS_MAC
@@ -60,13 +53,9 @@ QxtGlobalShortcutPrivate::~QxtGlobalShortcutPrivate()
#ifndef Q_OS_MAC
--ref;
if (ref == 0) {
- QAbstractEventDispatcher *ed = QAbstractEventDispatcher::instance();
+ QAbstractEventDispatcher *ed = QAbstractEventDispatcher::instance(qApp->thread());
if (ed != 0) {
-# if QT_VERSION < QT_VERSION_CHECK(5,0,0)
- ed->setEventFilter(prevEventFilter);
-# else
ed->removeNativeEventFilter(this);
-# endif
}
}
#endif // Q_OS_MAC