mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Consti'fy
This commit is contained in:
parent
d099123841
commit
e5ebb31e54
|
@ -1717,8 +1717,8 @@ bool KFileItemModel::lessThan(const ItemData* a, const ItemData* b, const QColla
|
|||
return (sortOrder() == Qt::AscendingOrder) ? result < 0 : result > 0;
|
||||
}
|
||||
|
||||
void KFileItemModel::sort(QList<KFileItemModel::ItemData*>::iterator begin,
|
||||
QList<KFileItemModel::ItemData*>::iterator end) const
|
||||
void KFileItemModel::sort(const QList<KFileItemModel::ItemData*>::iterator &begin,
|
||||
const QList<KFileItemModel::ItemData*>::iterator &end) const
|
||||
{
|
||||
auto lambdaLessThan = [&] (const KFileItemModel::ItemData* a, const KFileItemModel::ItemData* b)
|
||||
{
|
||||
|
@ -1982,7 +1982,7 @@ QList<QPair<int, QVariant> > KFileItemModel::sizeRoleGroups() const
|
|||
return groups;
|
||||
}
|
||||
|
||||
QList<QPair<int, QVariant> > KFileItemModel::timeRoleGroups(std::function<QDateTime(const ItemData *)> fileTimeCb) const
|
||||
QList<QPair<int, QVariant> > KFileItemModel::timeRoleGroups(const std::function<QDateTime(const ItemData *)> &fileTimeCb) const
|
||||
{
|
||||
Q_ASSERT(!m_itemData.isEmpty());
|
||||
|
||||
|
|
|
@ -371,7 +371,7 @@ private:
|
|||
* Sorts the items between \a begin and \a end using the comparison
|
||||
* function lessThan().
|
||||
*/
|
||||
void sort(QList<ItemData*>::iterator begin, QList<ItemData*>::iterator end) const;
|
||||
void sort(const QList<ItemData*>::iterator &begin, const QList<ItemData*>::iterator &end) const;
|
||||
|
||||
/**
|
||||
* Helper method for lessThan() and expandedParentsCountCompare(): Compares
|
||||
|
@ -386,7 +386,7 @@ private:
|
|||
|
||||
QList<QPair<int, QVariant> > nameRoleGroups() const;
|
||||
QList<QPair<int, QVariant> > sizeRoleGroups() const;
|
||||
QList<QPair<int, QVariant> > timeRoleGroups(std::function<QDateTime(const ItemData *)> fileTimeCb) const;
|
||||
QList<QPair<int, QVariant> > timeRoleGroups(const std::function<QDateTime(const ItemData *)> &fileTimeCb) const;
|
||||
QList<QPair<int, QVariant> > permissionRoleGroups() const;
|
||||
QList<QPair<int, QVariant> > ratingRoleGroups() const;
|
||||
QList<QPair<int, QVariant> > genericStringRoleGroups(const QByteArray& typeForRole) const;
|
||||
|
|
|
@ -405,7 +405,7 @@ void KFileItemModelRolesUpdater::slotItemsRemoved(const KItemRangeList& itemRang
|
|||
}
|
||||
}
|
||||
|
||||
void KFileItemModelRolesUpdater::slotItemsMoved(const KItemRange& itemRange, QList<int> movedToIndexes)
|
||||
void KFileItemModelRolesUpdater::slotItemsMoved(const KItemRange& itemRange, const QList<int> &movedToIndexes)
|
||||
{
|
||||
Q_UNUSED(itemRange);
|
||||
Q_UNUSED(movedToIndexes);
|
||||
|
|
|
@ -157,7 +157,7 @@ public:
|
|||
private slots:
|
||||
void slotItemsInserted(const KItemRangeList& itemRanges);
|
||||
void slotItemsRemoved(const KItemRangeList& itemRanges);
|
||||
void slotItemsMoved(const KItemRange& itemRange, QList<int> movedToIndexes);
|
||||
void slotItemsMoved(const KItemRange& itemRange, const QList<int> &movedToIndexes);
|
||||
void slotItemsChanged(const KItemRangeList& itemRanges,
|
||||
const QSet<QByteArray>& roles);
|
||||
void slotSortRoleChanged(const QByteArray& current,
|
||||
|
|
|
@ -197,7 +197,7 @@ struct KeyPress {
|
|||
*/
|
||||
struct ViewState {
|
||||
|
||||
ViewState(int current, const KItemSet selection, bool activated = false) :
|
||||
ViewState(int current, const KItemSet &selection, bool activated = false) :
|
||||
m_current(current),
|
||||
m_selection(selection),
|
||||
m_activated(activated)
|
||||
|
|
Loading…
Reference in a new issue