return m_groupedSorting;
}
-void KItemModelBase::setSortRole(const QByteArray& role)
+void KItemModelBase::setSortRole(const QByteArray& role, bool resortItems)
{
if (role != m_sortRole) {
const QByteArray previous = m_sortRole;
m_sortRole = role;
- onSortRoleChanged(role, previous);
+ onSortRoleChanged(role, previous, resortItems);
emit sortRoleChanged(role, previous);
}
}
QMimeData* KItemModelBase::createMimeData(const KItemSet& indexes) const
{
Q_UNUSED(indexes);
- return 0;
+ return nullptr;
}
int KItemModelBase::indexForKeyboardSearch(const QString& text, int startFromIndex) const
return false;
}
+QString KItemModelBase::blacklistItemDropEventMimeType() const
+{
+ return QStringLiteral("application/x-dolphin-blacklist-drop");
+}
+
void KItemModelBase::onGroupedSortingChanged(bool current)
{
Q_UNUSED(current);
}
-void KItemModelBase::onSortRoleChanged(const QByteArray& current, const QByteArray& previous)
+void KItemModelBase::onSortRoleChanged(const QByteArray& current, const QByteArray& previous, bool resortItems)
{
Q_UNUSED(current);
Q_UNUSED(previous);
+ Q_UNUSED(resortItems);
}
void KItemModelBase::onSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous)
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();
+}