summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarnav dhamija <arnav.dhamija@gmail.com>2016-09-25 14:16:22 (GMT)
committerarnav dhamija <arnav.dhamija@gmail.com>2016-09-25 14:16:22 (GMT)
commit1710304e9ba926d2aec4226d00974b826f9bcbc0 (patch)
tree16fe472cc13677496793c2a4967097e978379ef4
parent478de351757965af05c9282df72f5720d3f53f31 (diff)
Used KUrlMimeData::setUrls for kfileitemmodel's createMimeData for implementing the upcoming stash:/ ioslave
-rw-r--r--src/kitemviews/kfileitemmodel.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 1f94972..05f85a6 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -24,6 +24,8 @@
#include "dolphin_generalsettings.h"
#include <KLocalizedString>
+#include <KUrlMimeData>
+
#include "dolphindebug.h"
#include "private/kfileitemmodelsortalgorithm.h"
@@ -265,7 +267,7 @@ QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const
lastAddedItem = itemData;
const KFileItem& item = itemData->item;
if (!item.isNull()) {
- urls << item.targetUrl();
+ urls << item.url();
bool isLocal;
mostLocalUrls << item.mostLocalUrl(isLocal);
@@ -275,13 +277,7 @@ QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const
}
}
- const bool different = canUseMostLocalUrls && mostLocalUrls != urls;
- if (different) {
- data->setUrls(mostLocalUrls);
- } else {
- data->setUrls(urls);
- }
-
+ KUrlMimeData::setUrls(urls, mostLocalUrls, data);
return data;
}
@@ -2324,4 +2320,3 @@ bool KFileItemModel::isConsistent() const
return true;
}
-