Changeset View
Changeset View
Standalone View
Standalone View
src/kitemviews/kitemmodelbase.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 53 | { | |||
---|---|---|---|---|---|
58 | } | 58 | } | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | bool KItemModelBase::groupedSorting() const | 61 | bool KItemModelBase::groupedSorting() const | ||
62 | { | 62 | { | ||
63 | return m_groupedSorting; | 63 | return m_groupedSorting; | ||
64 | } | 64 | } | ||
65 | 65 | | |||
66 | void KItemModelBase::setSortRole(const QByteArray& role) | 66 | void KItemModelBase::setSortRole(const QByteArray& role, bool resortItems) | ||
67 | { | 67 | { | ||
68 | if (role != m_sortRole) { | 68 | if (role != m_sortRole) { | ||
69 | const QByteArray previous = m_sortRole; | 69 | const QByteArray previous = m_sortRole; | ||
70 | m_sortRole = role; | 70 | m_sortRole = role; | ||
71 | onSortRoleChanged(role, previous); | 71 | onSortRoleChanged(role, previous, resortItems); | ||
72 | emit sortRoleChanged(role, previous); | 72 | emit sortRoleChanged(role, previous); | ||
73 | } | 73 | } | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | QByteArray KItemModelBase::sortRole() const | 76 | QByteArray KItemModelBase::sortRole() const | ||
77 | { | 77 | { | ||
78 | return m_sortRole; | 78 | return m_sortRole; | ||
79 | } | 79 | } | ||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 146 | { | |||
147 | return QStringLiteral("application/x-dolphin-blacklist-drop"); | 147 | return QStringLiteral("application/x-dolphin-blacklist-drop"); | ||
148 | } | 148 | } | ||
149 | 149 | | |||
150 | void KItemModelBase::onGroupedSortingChanged(bool current) | 150 | void KItemModelBase::onGroupedSortingChanged(bool current) | ||
151 | { | 151 | { | ||
152 | Q_UNUSED(current); | 152 | Q_UNUSED(current); | ||
153 | } | 153 | } | ||
154 | 154 | | |||
155 | void KItemModelBase::onSortRoleChanged(const QByteArray& current, const QByteArray& previous) | 155 | void KItemModelBase::onSortRoleChanged(const QByteArray& current, const QByteArray& previous, bool resortItems) | ||
156 | { | 156 | { | ||
157 | Q_UNUSED(current); | 157 | Q_UNUSED(current); | ||
158 | Q_UNUSED(previous); | 158 | Q_UNUSED(previous); | ||
159 | Q_UNUSED(resortItems); | ||||
159 | } | 160 | } | ||
160 | 161 | | |||
161 | void KItemModelBase::onSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous) | 162 | void KItemModelBase::onSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous) | ||
162 | { | 163 | { | ||
163 | Q_UNUSED(current); | 164 | Q_UNUSED(current); | ||
164 | Q_UNUSED(previous); | 165 | Q_UNUSED(previous); | ||
165 | } | 166 | } | ||
166 | 167 | | |||
Show All 14 Lines |