┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2026-01-22 17:02:34 +0100
committerMéven Car <[email protected]>2026-01-22 17:03:09 +0100
commit3b89b43f097342bc76ab7b235f9649077a87deff (patch)
treefe41f01b4ca65e769d058a9356e029060266bdcc /src
parent1acd0dfe09a34817d8daf58db2c53b2262eec7b7 (diff)
clang-tidy: fix unecessary-value-param
Diffstat (limited to 'src')
-rw-r--r--src/dolphinmainwindow.cpp2
-rw-r--r--src/kitemviews/private/kitemlistheaderwidget.cpp2
-rw-r--r--src/search/bar.cpp2
-rw-r--r--src/search/bar.h2
-rw-r--r--src/search/popup.cpp2
-rw-r--r--src/views/dolphinview.cpp2
-rw-r--r--src/views/dolphinview.h2
7 files changed, 7 insertions, 7 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index dc3829d37..2ad1cc8e3 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -200,7 +200,7 @@ DolphinMainWindow::DolphinMainWindow()
connect(this, &DolphinMainWindow::urlChanged, m_remoteEncoding, &DolphinRemoteEncoding::slotAboutToOpenUrl);
m_disabledActionNotifier = new DisabledActionNotifier(this);
- connect(m_disabledActionNotifier, &DisabledActionNotifier::disabledActionTriggered, this, [this](const QAction *, QString reason) {
+ connect(m_disabledActionNotifier, &DisabledActionNotifier::disabledActionTriggered, this, [this](const QAction *, const QString &reason) {
m_activeViewContainer->showMessage(reason, KMessageWidget::Warning);
});
diff --git a/src/kitemviews/private/kitemlistheaderwidget.cpp b/src/kitemviews/private/kitemlistheaderwidget.cpp
index b147ecce2..f385e6644 100644
--- a/src/kitemviews/private/kitemlistheaderwidget.cpp
+++ b/src/kitemviews/private/kitemlistheaderwidget.cpp
@@ -18,7 +18,7 @@ namespace
/**
* @returns a list which has a reversed order of elements compared to @a list.
*/
-QList<QByteArray> reversed(const QList<QByteArray> list)
+QList<QByteArray> reversed(const QList<QByteArray> &list)
{
QList<QByteArray> reversedList;
for (auto i = list.rbegin(); i != list.rend(); i++) {
diff --git a/src/search/bar.cpp b/src/search/bar.cpp
index dd5acd150..851eef942 100644
--- a/src/search/bar.cpp
+++ b/src/search/bar.cpp
@@ -44,7 +44,7 @@ bool isSearchConfigured(const std::shared_ptr<const DolphinQuery> &searchConfigu
};
}
-Bar::Bar(std::shared_ptr<const DolphinQuery> dolphinQuery, QWidget *parent)
+Bar::Bar(const std::shared_ptr<const DolphinQuery> &dolphinQuery, QWidget *parent)
: AnimatedHeightWidget(parent)
, UpdatableStateInterface{dolphinQuery}
{
diff --git a/src/search/bar.h b/src/search/bar.h
index c45e838c7..969335232 100644
--- a/src/search/bar.h
+++ b/src/search/bar.h
@@ -54,7 +54,7 @@ public:
/**
* @brief Constructs a Search::Bar with an initial state matching @p dolphinQuery and with parent @p parent.
*/
- explicit Bar(std::shared_ptr<const DolphinQuery> dolphinQuery, QWidget *parent = nullptr);
+ explicit Bar(const std::shared_ptr<const DolphinQuery> &dolphinQuery, QWidget *parent = nullptr);
/**
* Returns the text that should be used as input
diff --git a/src/search/popup.cpp b/src/search/popup.cpp
index 35efc569a..2c4b38fa5 100644
--- a/src/search/popup.cpp
+++ b/src/search/popup.cpp
@@ -55,7 +55,7 @@ QString Search::balooUiName()
Popup::Popup(std::shared_ptr<const DolphinQuery> dolphinQuery, QWidget *parent)
: WidgetMenu{parent}
- , UpdatableStateInterface{dolphinQuery}
+ , UpdatableStateInterface{std::move(dolphinQuery)}
{
}
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 11c3cd6d2..9ade1e5e9 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -1790,7 +1790,7 @@ void DolphinView::resetZoomLevel()
setZoomLevel(ZoomLevelInfo::zoomLevelForIconSize(QSize(userDefaultIconSize, userDefaultIconSize)));
}
-void DolphinView::selectFileOnceAvailable(const QUrl &url, std::function<bool()> condition)
+void DolphinView::selectFileOnceAvailable(const QUrl &url, const std::function<bool()> &condition)
{
// need to wait for the item to be added to the model
QMetaObject::Connection *connection = new QMetaObject::Connection;
diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h
index 4918a7539..5a2907df7 100644
--- a/src/views/dolphinview.h
+++ b/src/views/dolphinview.h
@@ -965,7 +965,7 @@ private:
bool tryShowNameToolTip(QHelpEvent *event);
- void selectFileOnceAvailable(const QUrl &url, std::function<bool()> condition);
+ void selectFileOnceAvailable(const QUrl &url, const std::function<bool()> &condition);
private:
void updatePalette();