X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/283f97ac27c3cfe5c72682b0843503e31643a612..6e05c6365eec005caa3198a13bb071c782b8b192:/src/kitemviews/kitemmodelbase.cpp diff --git a/src/kitemviews/kitemmodelbase.cpp b/src/kitemviews/kitemmodelbase.cpp index 3e6114027..47db1f86d 100644 --- a/src/kitemviews/kitemmodelbase.cpp +++ b/src/kitemviews/kitemmodelbase.cpp @@ -22,17 +22,6 @@ #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,12 +98,37 @@ QList > KItemModelBase::groups() const return QList >(); } -QMimeData* KItemModelBase::createMimeData(const QSet& indexes) const +bool KItemModelBase::setExpanded(int index, bool expanded) { - Q_UNUSED(indexes); + 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 nullptr; +} + int KItemModelBase::indexForKeyboardSearch(const QString& text, int startFromIndex) const { Q_UNUSED(text); @@ -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(); +}