D6281: Prevent folders from drag and dropping onto themselves in dolphin main view

Henrik Fehlauer noreply at phabricator.kde.org
Thu Oct 26 22:47:44 BST 2017


rkflx added a comment.


  In https://phabricator.kde.org/D6281#160505, @emateli wrote:
  
  > Fix issue when prematurely releasing drop on a folder that was about to auto-open.
  
  
  Thanks for fixing, can confirm this now works very well for me.
  
  ---
  
  > I'm not sure about HAVE_BALOO guarding since I can't seem to spot it near the regions affected by this patch.
  
  I can only recommend setting up Arcanist and using `arc diff` to upload the patch instead of Phabricator's web upload, as this would allow to see (and comment on) the full context of a file.
  
  Anyway, have a look at how my patch moves the `#endif` around and see how this relates to the lines of code <https://phabricator.kde.org/source/dolphin/browse/master/src/panels/places/placesitemmodel.cpp;f20300256b19cb0a700bc6e5536ba9184503d918$1186> guarded by `HAVE_BALOO`. Do you see what I mean? I cannot imagine how your patch is related to baloo, this should compile for me even if I do not have baloo.
  
  > The decision to have a pure virtual function is that in the KItemModelBase there is no way to evaluate the indexIsDir function correctly, thus returning either true or false is technically incorrect.
  
  Well, I'm all for pure virtuals (and more `const`, BTW), but this breaks compiling the tests for me:
  
    src/tests/kitemlistselectionmanagertest.cpp:94:30: error: invalid new-expression of abstract class type ‘DummyModel’
         m_model = new DummyModel();
                                  ^
    src/tests/kitemlistselectionmanagertest.cpp:27:7: note:   because the following virtual functions are pure within ‘DummyModel’:
     class DummyModel : public KItemModelBase
           ^~~~~~~~~~
    In file included from src/tests/kitemlistselectionmanagertest.cpp:21:0:
    src/kitemviews/kitemmodelbase.h:193:18: note:        virtual bool KItemModelBase::indexIsDir(int)
         virtual bool indexIsDir(int index) = 0;
                      ^~~~~~~~~~
  
  You could try keeping the pure virtual, but adapting the test, of course.

REVISION DETAIL
  https://phabricator.kde.org/D6281

To: emateli, #dolphin, elvisangelaccio, ngraham, rkflx
Cc: rkflx, ngraham, elvisangelaccio, dfaure, anthonyfieroni, #konqueror, spoorun, navarromorales, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20171026/80776dd9/attachment.htm>


More information about the kfm-devel mailing list