Change to const QString&
This commit is contained in:
@@ -53,7 +53,7 @@ const int AuddLyricsProvider::kMaxLength = 6000;
|
||||
|
||||
AuddLyricsProvider::AuddLyricsProvider(QObject *parent) : LyricsProvider("AudD", parent), network_(new NetworkAccessManager(this)) {}
|
||||
|
||||
bool AuddLyricsProvider::StartSearch(const QString &artist, const QString &album, const QString &title, quint64 id) {
|
||||
bool AuddLyricsProvider::StartSearch(const QString &artist, const QString &album, const QString &title, const quint64 id) {
|
||||
|
||||
const ParamList params = ParamList() << Param("api_token", QByteArray::fromBase64(kAPITokenB64))
|
||||
<< Param("q", QString(artist + " " + title));
|
||||
@@ -66,7 +66,7 @@ bool AuddLyricsProvider::StartSearch(const QString &artist, const QString &album
|
||||
QUrl url(kUrlSearch);
|
||||
url.setQuery(url_query);
|
||||
QNetworkReply *reply = network_->get(QNetworkRequest(url));
|
||||
NewClosure(reply, SIGNAL(finished()), this, SLOT(HandleSearchReply(QNetworkReply*, quint64, QString, QString)), reply, id, artist, title);
|
||||
NewClosure(reply, SIGNAL(finished()), this, SLOT(HandleSearchReply(QNetworkReply*, const quint64, const QString&, const QString&)), reply, id, artist, title);
|
||||
|
||||
//qLog(Debug) << "AudDLyrics: Sending request for" << url;
|
||||
|
||||
@@ -77,7 +77,7 @@ bool AuddLyricsProvider::StartSearch(const QString &artist, const QString &album
|
||||
void AuddLyricsProvider::CancelSearch(quint64 id) {
|
||||
}
|
||||
|
||||
void AuddLyricsProvider::HandleSearchReply(QNetworkReply *reply, quint64 id, const QString artist, const QString title) {
|
||||
void AuddLyricsProvider::HandleSearchReply(QNetworkReply *reply, const quint64 id, const QString &artist, const QString &title) {
|
||||
|
||||
reply->deleteLater();
|
||||
|
||||
@@ -127,7 +127,7 @@ void AuddLyricsProvider::HandleSearchReply(QNetworkReply *reply, quint64 id, con
|
||||
|
||||
}
|
||||
|
||||
QJsonObject AuddLyricsProvider::ExtractJsonObj(QNetworkReply *reply, quint64 id) {
|
||||
QJsonObject AuddLyricsProvider::ExtractJsonObj(QNetworkReply *reply, const quint64 id) {
|
||||
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
QString failure_reason = QString("%1 (%2)").arg(reply->errorString()).arg(reply->error());
|
||||
@@ -206,7 +206,7 @@ QJsonArray AuddLyricsProvider::ExtractResult(QNetworkReply *reply, const quint64
|
||||
|
||||
}
|
||||
|
||||
void AuddLyricsProvider::Error(quint64 id, QString error, QVariant debug) {
|
||||
void AuddLyricsProvider::Error(const quint64 id, const QString &error, QVariant debug) {
|
||||
qLog(Error) << "AudDLyrics:" << error;
|
||||
if (debug.isValid()) qLog(Debug) << debug;
|
||||
LyricsSearchResults results;
|
||||
|
||||
Reference in New Issue
Block a user