Commit 4727211c authored by abbycin's avatar abbycin

fix linux command line compile error

parent 495fa523
...@@ -99,12 +99,6 @@ quint32 QGlobalShortcut::calcId(const QKeySequence& keyseq) { ...@@ -99,12 +99,6 @@ quint32 QGlobalShortcut::calcId(const QKeySequence& keyseq) {
return calcId(keycode, mods); return calcId(keycode, mods);
} }
#ifndef Q_OS_UNIX
quint32 QGlobalShortcut::calcId(quint32 k, quint32 m) {
return k | m;
}
#endif
Qt::Key QGlobalShortcut::getKey(const QKeySequence& keyseq) { Qt::Key QGlobalShortcut::getKey(const QKeySequence& keyseq) {
if (keyseq.isEmpty()) { if (keyseq.isEmpty()) {
return Qt::Key(0); return Qt::Key(0);
......
...@@ -42,7 +42,15 @@ private: ...@@ -42,7 +42,15 @@ private:
static QMultiHash<quint32, QGlobalShortcut*> shortcuts_; static QMultiHash<quint32, QGlobalShortcut*> shortcuts_;
static bool activate(quint32 id); static bool activate(quint32 id);
static inline quint32 calcId(const QKeySequence& keyseq); static inline quint32 calcId(const QKeySequence& keyseq);
static inline quint32 calcId(quint32 k, quint32 m); #ifdef Q_OS_WIN
static quint32 calcId(quint32 k, quint32 m) {
return k | m;
}
#else
static quint32 calcId(quint32 k, quint32 m) {
return k | (m << 16);
}
#endif
static inline Qt::Key getKey(const QKeySequence& keyseq); static inline Qt::Key getKey(const QKeySequence& keyseq);
static inline Qt::KeyboardModifiers getMods(const QKeySequence& keyseq); static inline Qt::KeyboardModifiers getMods(const QKeySequence& keyseq);
static quint32 toNativeKeycode(Qt::Key k); static quint32 toNativeKeycode(Qt::Key k);
......
...@@ -20,10 +20,6 @@ bool QGlobalShortcut::QGlobalShortcutEventFilter::nativeEventFilter( ...@@ -20,10 +20,6 @@ bool QGlobalShortcut::QGlobalShortcutEventFilter::nativeEventFilter(
return false; return false;
} }
quint32 QGlobalShortcut::calcId(quint32 k, quint32 m) {
return k | (m << 16);
}
quint32 QGlobalShortcut::toNativeKeycode(Qt::Key k) { quint32 QGlobalShortcut::toNativeKeycode(Qt::Key k) {
/* keysymdef.h */ /* keysymdef.h */
quint32 key = 0; quint32 key = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment