]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemmodelbase.cpp
Merge branch 'Applications/18.04'
[dolphin.git] / src / kitemviews / kitemmodelbase.cpp
index e2b86d8a03c71575e9828cf4e53ced9c8444c7d8..47db1f86d1d4286d719a09f0704c15666c311cbd 100644 (file)
 
 #include "kitemmodelbase.h"
 
-KItemRange::KItemRange(int index, int count) :
-    index(index),
-    count(count)
-{
-}
-
-bool KItemRange::operator == (const KItemRange& other) const
-{
-    return index == other.index && count == other.count;
-}
-
 KItemModelBase::KItemModelBase(QObject* parent) :
     QObject(parent),
     m_groupedSorting(false),
@@ -128,12 +117,18 @@ bool KItemModelBase::isExpandable(int index) const
     return false;
 }
 
-QMimeData* KItemModelBase::createMimeData(const QSet<int>& indexes) const
+int KItemModelBase::expandedParentsCount(int index) const
 {
-    Q_UNUSED(indexes);
+    Q_UNUSED(index);
     return 0;
 }
 
+QMimeData* KItemModelBase::createMimeData(const KItemSet& indexes) const
+{
+    Q_UNUSED(indexes);
+    return nullptr;
+}
+
 int KItemModelBase::indexForKeyboardSearch(const QString& text, int startFromIndex) const
 {
     Q_UNUSED(text);
@@ -147,6 +142,11 @@ bool KItemModelBase::supportsDropping(int index) const
     return false;
 }
 
+QString KItemModelBase::blacklistItemDropEventMimeType() const
+{
+    return QStringLiteral("application/x-dolphin-blacklist-drop");
+}
+
 void KItemModelBase::onGroupedSortingChanged(bool current)
 {
     Q_UNUSED(current);
@@ -164,4 +164,17 @@ void KItemModelBase::onSortOrderChanged(Qt::SortOrder current, Qt::SortOrder pre
     Q_UNUSED(previous);
 }
 
-#include "kitemmodelbase.moc"
+QUrl KItemModelBase::url(int index) const
+{
+    return data(index).value("url").toUrl();
+}
+
+bool KItemModelBase::isDir(int index) const
+{
+    return data(index).value("isDir").toBool();
+}
+
+QUrl KItemModelBase::directory() const
+{
+    return QUrl();
+}