diff options
| author | Méven Car <[email protected]> | 2026-01-22 16:15:09 +0100 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-01-22 16:27:11 +0100 |
| commit | 1acd0dfe09a34817d8daf58db2c53b2262eec7b7 (patch) | |
| tree | 94cab48dc8ad7c79c4fed016b8d0935c4e8dc3e5 /src/views/dolphinview.cpp | |
| parent | a403c0c6058d5064b8cc439edb41eb52ae384046 (diff) | |
clang-tidy: avoid copy, use const references
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index e471c198d..11c3cd6d2 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -560,7 +560,7 @@ bool DolphinView::sortHiddenLast() const void DolphinView::setVisibleRoles(const QList<QByteArray> &roles) { - const QList<QByteArray> previousRoles = roles; + const QList<QByteArray> &previousRoles = roles; ViewProperties props(viewPropertiesUrl()); props.setVisibleRoles(roles); @@ -2169,7 +2169,7 @@ void DolphinView::slotRoleEditingFinished(int index, const QByteArray &role, con } if (role == "text") { - const KFileItem oldItem = items.first(); + const KFileItem &oldItem = items.first(); const EditResult retVal = value.value<EditResult>(); const QString newName = retVal.newName; if (!newName.isEmpty() && newName != oldItem.text() && newName != QLatin1Char('.') && newName != QLatin1String("..")) { |
