diff options
author | Markku Heikkila <markku.heikkila@digia.com> | 2012-01-27 08:33:33 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-19 08:15:55 (GMT) |
commit | f6bf4b2baa91e55f40596bf3f2823b119fdfa5e0 (patch) | |
tree | 83646413217d09dc8d463eb9e9997b1e01dea5d4 /src/gui | |
parent | 8ccf7283a1a90d125a774027c6bc3028ab0d29f7 (diff) | |
download | Qt-f6bf4b2baa91e55f40596bf3f2823b119fdfa5e0.zip Qt-f6bf4b2baa91e55f40596bf3f2823b119fdfa5e0.tar.gz Qt-f6bf4b2baa91e55f40596bf3f2823b119fdfa5e0.tar.bz2 |
Drag and drop icon does not update correctly on Windows.
Drag and drop icon does not update correctly because WA_acceptDrops
attribute is not checked on DragOver event.
Drag and Drop icon does not update itself appropriately
when the cursor enters an invalid drop area.
Icon is not updated because WA_acceptDrops attribute is
not checked in dragover. Also removed lines which force parent
widget WA_acceptDrops to true, if child widget sets it to true.
No autotest, because QTestlib does not support drag and drop.
All examples under Drag and drop have been manually tested though.
Task-number: QTBUG-22987
Change-Id: I0c2b9dc7292db7710c5585d99790514329c2db8e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qdnd_win.cpp | 3 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_win.cpp | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/kernel/qdnd_win.cpp b/src/gui/kernel/qdnd_win.cpp index 96261ea..596d57a 100644 --- a/src/gui/kernel/qdnd_win.cpp +++ b/src/gui/kernel/qdnd_win.cpp @@ -703,7 +703,8 @@ QOleDropTarget::DragOver(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect) if (!QApplicationPrivate::tryModalHelper(dragOverWidget) - || !dragOverWidget->testAttribute(Qt::WA_DropSiteRegistered)) { + || !dragOverWidget->testAttribute(Qt::WA_DropSiteRegistered) + || !dragOverWidget->acceptDrops()) { *pdwEffect = DROPEFFECT_NONE; return NOERROR; } diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index 8a400cd..d09fafe 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -1773,8 +1773,6 @@ QOleDropTarget* QWidgetPrivate::registerOleDnd(QWidget *widget) Q_ASSERT(nativeParent); QWExtra *nativeExtra = nativeParent->d_func()->extra; Q_ASSERT(nativeExtra); - if (!nativeParent->acceptDrops()) - nativeParent->setAcceptDrops(true); if (!nativeExtra->oleDropWidgets.contains(widget)) nativeExtra->oleDropWidgets.append(widget); if (!nativeExtra->dropTarget) { |