mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 11:35:24 +01:00
Fix some minor C++ things in OutgoingDataCreator.
This commit is contained in:
parent
9f4aaee50e
commit
1ad5884b39
@ -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);
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user