Changeset 466

Timestamp:
Jan 22, 2010, 3:38:55 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: DnD: Fixed: Drag events over children that don't accept drops are now propagated to parents (similarly to other platforms).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/qdnd_pm.cpp

    r465 r466  
    511511            }
    512512
    513             if (!dragOverWidget->acceptDrops()) {
    514                 // We don't reply with DOR_NEVERDROP here because in this
    515                 // case PM will stop sending DM_DRAGOVER to the given HWND but
    516                 // we may have another non-native child (that has the same HWND)
    517                 // at a different position that accepts drops
    518                 DrgFreeDraginfo(info);
    519                 return MRFROM2SHORT(DOR_NODROP, 0);
    520             }
     513            // Note: we don't check if dragOverWidget->acceptDrops() here since
     514            // this will be checked in QApplication::notify() and the
     515            // appropriate action will be taken (the message will be delivered
     516            // to the parent)
    521517
    522518            USHORT dropReply = dragData->lastDropReply;
     
    688684            if (dragData->lastDragOverWidget != widget)
    689685                pnt = dragData->lastDragOverWidget->mapFrom(widget, pnt);
    690 
    691             Q_ASSERT(dragData->lastDragOverWidget->acceptDrops());
    692             if (!dragData->lastDragOverWidget->acceptDrops()) {
    693                 DrgDeleteDraginfoStrHandles(info);
    694                 DrgFreeDraginfo(info);
    695                 return 0;
    696             }
    697686
    698687            QMimeData *data = manager->source() ? manager->dragPrivate()->data : manager->dropData;
Note: See TracChangeset for help on using the changeset viewer.