]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix crash when dragging children of expanded folders in Details View
authorFrank Reininghaus <frank78ac@googlemail.com>
Sun, 22 Dec 2013 12:17:05 +0000 (13:17 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Sun, 22 Dec 2013 12:17:05 +0000 (13:17 +0100)
The problem was that the loop in KFileItemModel::createMimeData() which
is supposed to find out if any parent of an item has been added to the
QMimeData already (because it is not necessary to add the item in that
case) did not loop through the parents of the item, but incorrectly
replaced the local variable 'itemData' by its parent.

BUG: 329119
REVIEW: 114562

src/kitemviews/kfileitemmodel.cpp

index 4521374e6f80f26ab44fe1dd16873f95d2c3f35c..058248a189d9ad3a6ec032266860e4e35aa71fee 100644 (file)
@@ -253,7 +253,7 @@ QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const
         const ItemData* parent = itemData->parent;
 
         while (parent && parent != lastAddedItem) {
         const ItemData* parent = itemData->parent;
 
         while (parent && parent != lastAddedItem) {
-            itemData = itemData->parent;
+            parent = parent->parent;
         }
 
         if (parent && parent == lastAddedItem) {
         }
 
         if (parent && parent == lastAddedItem) {