diff --git a/src/networkremote/outgoingdatacreator.cpp b/src/networkremote/outgoingdatacreator.cpp index 83fdc99da..d5db3bac4 100644 --- a/src/networkremote/outgoingdatacreator.cpp +++ b/src/networkremote/outgoingdatacreator.cpp @@ -871,14 +871,14 @@ void OutgoingDataCreator::SendKitten(const QImage& kitten) { } } -void OutgoingDataCreator::DoGlobalSearch(QString &query, RemoteClient *client) { +void OutgoingDataCreator::DoGlobalSearch(const QString &query, RemoteClient *client) { int id = app_->global_search()->SearchAsync(query); GlobalSearchRequest request(id, query, client); global_search_result_map_.insert(id, request); } -void OutgoingDataCreator::ResultsAvailable(int id, SearchProvider::ResultList results) { +void OutgoingDataCreator::ResultsAvailable(int id, const SearchProvider::ResultList& results) { if (!global_search_result_map_.contains(id)) return; GlobalSearchRequest search_request = global_search_result_map_.value(id); diff --git a/src/networkremote/outgoingdatacreator.h b/src/networkremote/outgoingdatacreator.h index c4bf2dc21..d4eabe735 100644 --- a/src/networkremote/outgoingdatacreator.h +++ b/src/networkremote/outgoingdatacreator.h @@ -43,8 +43,8 @@ struct GlobalSearchRequest { QString query_; RemoteClient* client_; GlobalSearchRequest() - : id_(-1), query_(""), client_(nullptr) {} - GlobalSearchRequest(int i, QString q, RemoteClient* c) + : id_(-1), client_(nullptr) {} + GlobalSearchRequest(int i, const QString& q, RemoteClient* c) : id_(i), query_(q), client_(c) {} }; @@ -89,8 +89,8 @@ class OutgoingDataCreator : public QObject { void EnableKittens(bool aww); void SendKitten(const QImage& kitten); - void DoGlobalSearch(QString& query, RemoteClient* client); - void ResultsAvailable(int id, SearchProvider::ResultList results); + void DoGlobalSearch(const QString& query, RemoteClient* client); + void ResultsAvailable(int id, const SearchProvider::ResultList& results); void SearchFinished(int id); private: