Review Request 110333: Fix cross-process Drag&Drop in KoDocumentSectionView

Dmitry Kazakov dimula73 at gmail.com
Tue May 7 11:50:07 BST 2013



> On May 7, 2013, 7:17 a.m., Boudewijn Rempt wrote:
> > krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp, line 348
> > <http://git.reviewboard.kde.org/r/110333/diff/1/?file=142382#file142382line348>
> >
> >     Note for the future: a dynamic cast and a static cast here -- we really need to think about a better design for this!

Well, the static_cast here is just for convenience of reading the code. It can be easily omitted, because it traverses up the hierarchy. And the dynamic_cast cannot be avoided because of Ko-libs. I have no access to the KisShapeController, which is needed for moving shapes from one document to another.


- Dmitry


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110333/#review32179
-----------------------------------------------------------


On May 6, 2013, 4:30 p.m., Dmitry Kazakov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110333/
> -----------------------------------------------------------
> 
> (Updated May 6, 2013, 4:30 p.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Description
> -------
> 
> It happens so, that when the cross-process Drag is dropped to the KoDocumentSectionView, some spurious MouseMove event come and start another Drag (effectively, cancelling the current one). I guess, that happens due to some weird order of setting up of event filters (in QWidget and in QDragManager), so that the QWidget's filter gets the MouseMove events before the QDragManager's one. Actually, QWidget should not get any MouseMove events during Dragiing. It should get DragMoveEvents instead.
> 
> This patch workarounds this problem (i guess, Qt is the cause) and drops all the MouseMove events when they come while the Dragging operation. I activate the workaround on X11 only, because, most probably, Qt's D&D works differently on Windows.
> 
> This patch fixed bug:
> https://bugs.kde.org/show_bug.cgi?id=319334
> 
> 
> Diffs
> -----
> 
>   krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp 12689ed 
>   krita/ui/kis_mimedata.h 7055043 
>   krita/ui/kis_mimedata.cpp 64af6b3 
>   krita/ui/kis_node_model.h c1854a0 
>   krita/ui/kis_node_model.cpp 3a21127 
>   krita/ui/kis_view2.cpp 7d4c6da 
>   krita/ui/tests/kis_model_index_converter_test.cpp 80a3117 
>   krita/ui/tests/kis_node_model_test.cpp 1c9bb21 
>   libs/main/KoDocumentSectionView.h 7a535cb 
>   libs/main/KoDocumentSectionView.cpp 768c671 
> 
> Diff: http://git.reviewboard.kde.org/r/110333/diff/
> 
> 
> Testing
> -------
> 
> Tested vastly on the Layer Box in Krita.
> 
> 
> Thanks,
> 
> Dmitry Kazakov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20130507/2d9bbc9c/attachment.htm>


More information about the calligra-devel mailing list