diff --git a/src/akonadi/akonadidatasourcequeries.h b/src/akonadi/akonadidatasourcequeries.h --- a/src/akonadi/akonadidatasourcequeries.h +++ b/src/akonadi/akonadidatasourcequeries.h @@ -55,7 +55,7 @@ DataSourceResult::Ptr findChildren(Domain::DataSource::Ptr source) const Q_DECL_OVERRIDE; QString searchTerm() const Q_DECL_OVERRIDE; - void setSearchTerm(QString term) Q_DECL_OVERRIDE; + void setSearchTerm(const QString &term) Q_DECL_OVERRIDE; DataSourceResult::Ptr findSearchTopLevel() const Q_DECL_OVERRIDE; DataSourceResult::Ptr findSearchChildren(Domain::DataSource::Ptr source) const Q_DECL_OVERRIDE; diff --git a/src/akonadi/akonadidatasourcequeries.cpp b/src/akonadi/akonadidatasourcequeries.cpp --- a/src/akonadi/akonadidatasourcequeries.cpp +++ b/src/akonadi/akonadidatasourcequeries.cpp @@ -87,7 +87,7 @@ return m_searchTerm; } -void DataSourceQueries::setSearchTerm(QString term) +void DataSourceQueries::setSearchTerm(const QString &term) { if (m_searchTerm == term) return; diff --git a/src/domain/datasourcequeries.h b/src/domain/datasourcequeries.h --- a/src/domain/datasourcequeries.h +++ b/src/domain/datasourcequeries.h @@ -69,7 +69,7 @@ virtual QueryResult::Ptr findChildren(DataSource::Ptr source) const = 0; virtual QString searchTerm() const = 0; - virtual void setSearchTerm(QString term) = 0; + virtual void setSearchTerm(const QString &term) = 0; virtual QueryResult::Ptr findSearchTopLevel() const = 0; virtual QueryResult::Ptr findSearchChildren(DataSource::Ptr source) const = 0; diff --git a/tests/testlib/gennote.h b/tests/testlib/gennote.h --- a/tests/testlib/gennote.h +++ b/tests/testlib/gennote.h @@ -39,7 +39,7 @@ GenNote &withId(Akonadi::Item::Id id); GenNote &withParent(Akonadi::Collection::Id id); - GenNote &withTags(QList ids); + GenNote &withTags(const QList &ids); GenNote &withParentUid(const QString &uid); GenNote &withTitle(const QString &title); GenNote &withText(const QString &text); diff --git a/tests/testlib/gennote.cpp b/tests/testlib/gennote.cpp --- a/tests/testlib/gennote.cpp +++ b/tests/testlib/gennote.cpp @@ -55,7 +55,7 @@ return *this; } -GenNote &GenNote::withTags(QList ids) +GenNote &GenNote::withTags(const QList &ids) { auto tags = Akonadi::Tag::List(); std::transform(ids.constBegin(), ids.constEnd(), diff --git a/tests/testlib/gentodo.h b/tests/testlib/gentodo.h --- a/tests/testlib/gentodo.h +++ b/tests/testlib/gentodo.h @@ -39,7 +39,7 @@ GenTodo &withId(Akonadi::Item::Id id); GenTodo &withParent(Akonadi::Collection::Id id); - GenTodo &withTags(QList ids); + GenTodo &withTags(const QList &ids); GenTodo &asProject(bool value = true); GenTodo &withUid(const QString &uid); GenTodo &withParentUid(const QString &uid); diff --git a/tests/testlib/gentodo.cpp b/tests/testlib/gentodo.cpp --- a/tests/testlib/gentodo.cpp +++ b/tests/testlib/gentodo.cpp @@ -53,7 +53,7 @@ return *this; } -GenTodo &GenTodo::withTags(QList ids) +GenTodo &GenTodo::withTags(const QList &ids) { auto tags = Akonadi::Tag::List(); std::transform(ids.constBegin(), ids.constEnd(),