diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qdnd_win.cpp | 16 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_p.h | 2 | ||||
-rw-r--r-- | src/gui/util/qcompleter.cpp | 2 |
3 files changed, 8 insertions, 12 deletions
diff --git a/src/gui/kernel/qdnd_win.cpp b/src/gui/kernel/qdnd_win.cpp index 0742a93..a164c2a 100644 --- a/src/gui/kernel/qdnd_win.cpp +++ b/src/gui/kernel/qdnd_win.cpp @@ -524,18 +524,14 @@ QOleDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState) if (fEscapePressed) { return ResultFromScode(DRAGDROP_S_CANCEL); - } else if (!(grfKeyState & (MK_LBUTTON|MK_MBUTTON|MK_RBUTTON))) { + } else if ((GetAsyncKeyState(VK_LBUTTON) == 0) + && (GetAsyncKeyState(VK_MBUTTON) == 0) + && (GetAsyncKeyState(VK_RBUTTON) == 0)) { + // grfKeyState is broken on CE & some Windows XP versions, + // therefore we need to check the state manually return ResultFromScode(DRAGDROP_S_DROP); } else { -#if defined(Q_OS_WINCE) - // grfKeyState is broken on CE, therefore need to check - // the state manually - if ((GetAsyncKeyState(VK_LBUTTON) == 0) && - (GetAsyncKeyState(VK_MBUTTON) == 0) && - (GetAsyncKeyState(VK_RBUTTON) == 0)) { - return ResultFromScode(DRAGDROP_S_DROP); - } -#else +#if !defined(Q_OS_WINCE) if (currentButtons == Qt::NoButton) { currentButtons = keystate_to_mousebutton(grfKeyState); } else { diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index c32e1a1..ef7ac1f 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -680,7 +680,7 @@ public: QMap<Qt::GestureType, Qt::GestureFlags> gestureContext; // Bit fields. - uint high_attributes[3]; // the low ones are in QWidget::widget_attributes + uint high_attributes[4]; // the low ones are in QWidget::widget_attributes QPalette::ColorRole fg_role : 8; QPalette::ColorRole bg_role : 8; uint dirtyOpaqueChildren : 1; diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp index 387bf87..c095b3b 100644 --- a/src/gui/util/qcompleter.cpp +++ b/src/gui/util/qcompleter.cpp @@ -1110,7 +1110,7 @@ void QCompleter::setPopup(QAbstractItemView *popup) delete d->popup; if (popup->model() != d->proxy) popup->setModel(d->proxy); -#ifdef Q_OS_MAC +#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA) popup->show(); #else popup->hide(); |