]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemmodelbase.cpp
Fix scrolling during inline renaming causes rename of wrong file
[dolphin.git] / src / kitemviews / kitemmodelbase.cpp
index 3e611402797fa22b3a235c404b374bdadde5f86e..d73468336b6dde6071b578fe703ee78a8a5d15d8 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),
@@ -109,7 +98,32 @@ QList<QPair<int, QVariant> > KItemModelBase::groups() const
     return QList<QPair<int, QVariant> >();
 }
 
-QMimeData* KItemModelBase::createMimeData(const QSet<int>& indexes) const
+bool KItemModelBase::setExpanded(int index, bool expanded)
+{
+    Q_UNUSED(index);
+    Q_UNUSED(expanded);
+    return false;
+}
+
+bool KItemModelBase::isExpanded(int index) const
+{
+    Q_UNUSED(index);
+    return false;
+}
+
+bool KItemModelBase::isExpandable(int index) const
+{
+    Q_UNUSED(index);
+    return false;
+}
+
+int KItemModelBase::expandedParentsCount(int index) const
+{
+    Q_UNUSED(index);
+    return 0;
+}
+
+QMimeData* KItemModelBase::createMimeData(const KItemSet& indexes) const
 {
     Q_UNUSED(indexes);
     return 0;
@@ -128,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);
@@ -145,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();
+}
\ No newline at end of file