Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit e5ebb31e authored by Laurent Montel's avatar Laurent Montel 😁

Consti'fy

parent d0991238
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment