Replace emit with Q_EMIT
This commit is contained in:
@@ -195,5 +195,5 @@ void AudioScrobbler::WriteCache() {
|
||||
}
|
||||
|
||||
void AudioScrobbler::ErrorReceived(const QString &error) {
|
||||
emit ErrorMessage(error);
|
||||
Q_EMIT ErrorMessage(error);
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ void LastFMImport::GetRecentTracksRequestFinished(QNetworkReply *reply, const in
|
||||
QString title = obj_track[QLatin1String("name")].toString();
|
||||
QDateTime datetime = QDateTime::fromString(date, QStringLiteral("dd MMM yyyy, hh:mm"));
|
||||
if (datetime.isValid()) {
|
||||
emit UpdateLastPlayed(artist, album, title, datetime.toSecsSinceEpoch());
|
||||
Q_EMIT UpdateLastPlayed(artist, album, title, datetime.toSecsSinceEpoch());
|
||||
}
|
||||
|
||||
UpdateProgressCheck();
|
||||
@@ -545,7 +545,7 @@ void LastFMImport::GetTopTracksRequestFinished(QNetworkReply *reply, const int p
|
||||
|
||||
if (playcount <= 0) continue;
|
||||
|
||||
emit UpdatePlayCount(artist, title, playcount, false);
|
||||
Q_EMIT UpdatePlayCount(artist, title, playcount, false);
|
||||
UpdateProgressCheck();
|
||||
|
||||
}
|
||||
@@ -565,16 +565,16 @@ void LastFMImport::GetTopTracksRequestFinished(QNetworkReply *reply, const int p
|
||||
void LastFMImport::UpdateTotalCheck() {
|
||||
|
||||
if ((!playcount_ || playcount_total_ > 0) && (!lastplayed_ || lastplayed_total_ > 0))
|
||||
emit UpdateTotal(lastplayed_total_, playcount_total_);
|
||||
Q_EMIT UpdateTotal(lastplayed_total_, playcount_total_);
|
||||
|
||||
}
|
||||
|
||||
void LastFMImport::UpdateProgressCheck() {
|
||||
emit UpdateProgress(lastplayed_received_, playcount_received_);
|
||||
Q_EMIT UpdateProgress(lastplayed_received_, playcount_received_);
|
||||
}
|
||||
|
||||
void LastFMImport::FinishCheck() {
|
||||
if (replies_.isEmpty() && recent_tracks_requests_.isEmpty() && top_tracks_requests_.isEmpty()) emit Finished();
|
||||
if (replies_.isEmpty() && recent_tracks_requests_.isEmpty() && top_tracks_requests_.isEmpty()) Q_EMIT Finished();
|
||||
}
|
||||
|
||||
void LastFMImport::Error(const QString &error, const QVariant &debug) {
|
||||
@@ -582,7 +582,7 @@ void LastFMImport::Error(const QString &error, const QVariant &debug) {
|
||||
qLog(Error) << error;
|
||||
if (debug.isValid()) qLog(Debug) << debug;
|
||||
|
||||
emit FinishedWithError(error);
|
||||
Q_EMIT FinishedWithError(error);
|
||||
|
||||
AbortAll();
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ void ListenBrainzScrobbler::AuthenticateReplyFinished(QNetworkReply *reply) {
|
||||
refresh_login_timer_.start();
|
||||
}
|
||||
|
||||
emit AuthenticationComplete(true);
|
||||
Q_EMIT AuthenticationComplete(true);
|
||||
|
||||
qLog(Debug) << "ListenBrainz: Authentication was successful, login expires in" << expires_in_;
|
||||
|
||||
@@ -667,7 +667,7 @@ void ListenBrainzScrobbler::LoveRequestFinished(QNetworkReply *reply) {
|
||||
void ListenBrainzScrobbler::AuthError(const QString &error) {
|
||||
|
||||
qLog(Error) << "ListenBrainz" << error;
|
||||
emit AuthenticationComplete(false, error);
|
||||
Q_EMIT AuthenticationComplete(false, error);
|
||||
|
||||
}
|
||||
|
||||
@@ -677,7 +677,7 @@ void ListenBrainzScrobbler::Error(const QString &error, const QVariant &debug) {
|
||||
if (debug.isValid()) qLog(Debug) << debug;
|
||||
|
||||
if (settings_->show_error_dialog()) {
|
||||
emit ErrorMessage(tr("ListenBrainz error: %1").arg(error));
|
||||
Q_EMIT ErrorMessage(tr("ListenBrainz error: %1").arg(error));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -82,9 +82,9 @@ void ScrobblerSettings::ReloadSettings() {
|
||||
}
|
||||
}
|
||||
|
||||
emit ScrobblingEnabledChanged(enabled_);
|
||||
emit ScrobbleButtonVisibilityChanged(scrobble_button_);
|
||||
emit LoveButtonVisibilityChanged(love_button_);
|
||||
Q_EMIT ScrobblingEnabledChanged(enabled_);
|
||||
Q_EMIT ScrobbleButtonVisibilityChanged(scrobble_button_);
|
||||
Q_EMIT LoveButtonVisibilityChanged(love_button_);
|
||||
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ void ScrobblerSettings::ToggleScrobbling() {
|
||||
s.setValue("enabled", enabled_);
|
||||
s.endGroup();
|
||||
|
||||
if (enabled_ != enabled_old_) emit ScrobblingEnabledChanged(enabled_);
|
||||
if (enabled_ != enabled_old_) Q_EMIT ScrobblingEnabledChanged(enabled_);
|
||||
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ void ScrobblerSettings::ToggleOffline() {
|
||||
s.setValue("offline", offline_);
|
||||
s.endGroup();
|
||||
|
||||
if (offline_ != offline_old_) { emit ScrobblingOfflineChanged(offline_); }
|
||||
if (offline_ != offline_old_) { Q_EMIT ScrobblingOfflineChanged(offline_); }
|
||||
|
||||
}
|
||||
|
||||
@@ -121,5 +121,5 @@ void ScrobblerSettings::ShowConfig() {
|
||||
}
|
||||
|
||||
void ScrobblerSettings::ErrorReceived(const QString &error) {
|
||||
emit ErrorMessage(error);
|
||||
Q_EMIT ErrorMessage(error);
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ void ScrobblingAPI20::Authenticate() {
|
||||
server_->deleteLater();
|
||||
server_ = nullptr;
|
||||
}
|
||||
emit AuthenticationComplete(false);
|
||||
Q_EMIT AuthenticationComplete(false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -344,7 +344,7 @@ void ScrobblingAPI20::AuthenticateReplyFinished(QNetworkReply *reply) {
|
||||
s.setValue("session_key", session_key_);
|
||||
s.endGroup();
|
||||
|
||||
emit AuthenticationComplete(true);
|
||||
Q_EMIT AuthenticationComplete(true);
|
||||
|
||||
StartSubmit();
|
||||
|
||||
@@ -460,7 +460,7 @@ void ScrobblingAPI20::Scrobble(const Song &song) {
|
||||
|
||||
if (!authenticated()) {
|
||||
if (settings_->show_error_dialog()) {
|
||||
emit ErrorMessage(tr("Scrobbler %1 is not authenticated!").arg(name_));
|
||||
Q_EMIT ErrorMessage(tr("Scrobbler %1 is not authenticated!").arg(name_));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -899,7 +899,7 @@ void ScrobblingAPI20::LoveRequestFinished(QNetworkReply *reply) {
|
||||
void ScrobblingAPI20::AuthError(const QString &error) {
|
||||
|
||||
qLog(Error) << name_ << error;
|
||||
emit AuthenticationComplete(false, error);
|
||||
Q_EMIT AuthenticationComplete(false, error);
|
||||
|
||||
}
|
||||
|
||||
@@ -909,7 +909,7 @@ void ScrobblingAPI20::Error(const QString &error, const QVariant &debug) {
|
||||
if (debug.isValid()) qLog(Debug) << debug;
|
||||
|
||||
if (settings_->show_error_dialog()) {
|
||||
emit ErrorMessage(tr("Scrobbler %1 error: %2").arg(name_, error));
|
||||
Q_EMIT ErrorMessage(tr("Scrobbler %1 error: %2").arg(name_, error));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user