Changeset 472


Ignore:
Timestamp:
Jan 25, 2010, 5:56:00 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: DnD: Fixed: Don't accept QDragMoveEvent by default if the previous QDragEnterEvent/QDragMoveEvent was rejected.

File:
1 edited

Legend:

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

    r471 r472  
    557557                        ((dragData->supportedOps & DO_LINKABLE) && realOp == DO_LINK);
    558558                    dragData->lastDragOverOp = realOp;
    559                     dropReply = dragData->sourceAllowsOp ? DOR_DROP : DOR_NODROP;
     559                    // make sure the default accepted state for the next event
     560                    // correlates with the set of supported operations
     561                    if (dropReply == DOR_DROP)
     562                        dropReply = dragData->sourceAllowsOp ? DOR_DROP : DOR_NODROP;
    560563                }
    561564
     
    583586                        dropReply = DOR_NODROP;
    584587                    }
     588                    DEBUG(() << "DM_DRAGOVER: QDragEnterEvent: accepted" << dee.isAccepted());
    585589                }
    586590
     
    604608                        dropReply = DOR_NODROP;
    605609                    }
     610                    DEBUG(() << "DM_DRAGOVER: QDragMoveEvent: accepted" << dme.isAccepted());
    606611                }
    607612
     
    611616            DrgFreeDraginfo(info);
    612617
    613             DEBUG(("DM_DRAGOVER: return %08lx default %08lx",
     618            DEBUG(("DM_DRAGOVER: return %08x default %08x",
    614619                   dropReply, toPmDragDropOp(dragData->lastAction)));
    615620            return MRFROM2SHORT(dropReply, toPmDragDropOp(dragData->lastAction));
Note: See TracChangeset for help on using the changeset viewer.