Replace emit with Q_EMIT
This commit is contained in:
@@ -194,7 +194,7 @@ void SpotifyService::ExitReceived() {
|
||||
QObject::disconnect(obj, nullptr, this, nullptr);
|
||||
qLog(Debug) << obj << "successfully exited.";
|
||||
wait_for_exit_.removeAll(obj);
|
||||
if (wait_for_exit_.isEmpty()) emit ExitFinished();
|
||||
if (wait_for_exit_.isEmpty()) Q_EMIT ExitFinished();
|
||||
|
||||
}
|
||||
|
||||
@@ -496,8 +496,8 @@ void SpotifyService::AccessTokenRequestFinished(QNetworkReply *reply) {
|
||||
|
||||
qLog(Debug) << "Spotify: Authentication was successful, login expires in" << expires_in_;
|
||||
|
||||
emit LoginComplete(true);
|
||||
emit LoginSuccess();
|
||||
Q_EMIT LoginComplete(true);
|
||||
Q_EMIT LoginSuccess();
|
||||
|
||||
}
|
||||
|
||||
@@ -514,7 +514,7 @@ void SpotifyService::ResetArtistsRequest() {
|
||||
void SpotifyService::GetArtists() {
|
||||
|
||||
if (!authenticated()) {
|
||||
emit ArtistsResults(SongMap(), tr("Not authenticated with Spotify."));
|
||||
Q_EMIT ArtistsResults(SongMap(), tr("Not authenticated with Spotify."));
|
||||
ShowConfig();
|
||||
return;
|
||||
}
|
||||
@@ -533,24 +533,24 @@ void SpotifyService::GetArtists() {
|
||||
void SpotifyService::ArtistsResultsReceived(const int id, const SongMap &songs, const QString &error) {
|
||||
|
||||
Q_UNUSED(id);
|
||||
emit ArtistsResults(songs, error);
|
||||
Q_EMIT ArtistsResults(songs, error);
|
||||
ResetArtistsRequest();
|
||||
|
||||
}
|
||||
|
||||
void SpotifyService::ArtistsUpdateStatusReceived(const int id, const QString &text) {
|
||||
Q_UNUSED(id);
|
||||
emit ArtistsUpdateStatus(text);
|
||||
Q_EMIT ArtistsUpdateStatus(text);
|
||||
}
|
||||
|
||||
void SpotifyService::ArtistsProgressSetMaximumReceived(const int id, const int max) {
|
||||
Q_UNUSED(id);
|
||||
emit ArtistsProgressSetMaximum(max);
|
||||
Q_EMIT ArtistsProgressSetMaximum(max);
|
||||
}
|
||||
|
||||
void SpotifyService::ArtistsUpdateProgressReceived(const int id, const int progress) {
|
||||
Q_UNUSED(id);
|
||||
emit ArtistsUpdateProgress(progress);
|
||||
Q_EMIT ArtistsUpdateProgress(progress);
|
||||
}
|
||||
|
||||
void SpotifyService::ResetAlbumsRequest() {
|
||||
@@ -566,7 +566,7 @@ void SpotifyService::ResetAlbumsRequest() {
|
||||
void SpotifyService::GetAlbums() {
|
||||
|
||||
if (!authenticated()) {
|
||||
emit AlbumsResults(SongMap(), tr("Not authenticated with Spotify."));
|
||||
Q_EMIT AlbumsResults(SongMap(), tr("Not authenticated with Spotify."));
|
||||
ShowConfig();
|
||||
return;
|
||||
}
|
||||
@@ -585,24 +585,24 @@ void SpotifyService::GetAlbums() {
|
||||
void SpotifyService::AlbumsResultsReceived(const int id, const SongMap &songs, const QString &error) {
|
||||
|
||||
Q_UNUSED(id);
|
||||
emit AlbumsResults(songs, error);
|
||||
Q_EMIT AlbumsResults(songs, error);
|
||||
ResetAlbumsRequest();
|
||||
|
||||
}
|
||||
|
||||
void SpotifyService::AlbumsUpdateStatusReceived(const int id, const QString &text) {
|
||||
Q_UNUSED(id);
|
||||
emit AlbumsUpdateStatus(text);
|
||||
Q_EMIT AlbumsUpdateStatus(text);
|
||||
}
|
||||
|
||||
void SpotifyService::AlbumsProgressSetMaximumReceived(const int id, const int max) {
|
||||
Q_UNUSED(id);
|
||||
emit AlbumsProgressSetMaximum(max);
|
||||
Q_EMIT AlbumsProgressSetMaximum(max);
|
||||
}
|
||||
|
||||
void SpotifyService::AlbumsUpdateProgressReceived(const int id, const int progress) {
|
||||
Q_UNUSED(id);
|
||||
emit AlbumsUpdateProgress(progress);
|
||||
Q_EMIT AlbumsUpdateProgress(progress);
|
||||
}
|
||||
|
||||
void SpotifyService::ResetSongsRequest() {
|
||||
@@ -618,7 +618,7 @@ void SpotifyService::ResetSongsRequest() {
|
||||
void SpotifyService::GetSongs() {
|
||||
|
||||
if (!authenticated()) {
|
||||
emit SongsResults(SongMap(), tr("Not authenticated with Spotify."));
|
||||
Q_EMIT SongsResults(SongMap(), tr("Not authenticated with Spotify."));
|
||||
ShowConfig();
|
||||
return;
|
||||
}
|
||||
@@ -637,24 +637,24 @@ void SpotifyService::GetSongs() {
|
||||
void SpotifyService::SongsResultsReceived(const int id, const SongMap &songs, const QString &error) {
|
||||
|
||||
Q_UNUSED(id);
|
||||
emit SongsResults(songs, error);
|
||||
Q_EMIT SongsResults(songs, error);
|
||||
ResetSongsRequest();
|
||||
|
||||
}
|
||||
|
||||
void SpotifyService::SongsUpdateStatusReceived(const int id, const QString &text) {
|
||||
Q_UNUSED(id);
|
||||
emit SongsUpdateStatus(text);
|
||||
Q_EMIT SongsUpdateStatus(text);
|
||||
}
|
||||
|
||||
void SpotifyService::SongsProgressSetMaximumReceived(const int id, const int max) {
|
||||
Q_UNUSED(id);
|
||||
emit SongsProgressSetMaximum(max);
|
||||
Q_EMIT SongsProgressSetMaximum(max);
|
||||
}
|
||||
|
||||
void SpotifyService::SongsUpdateProgressReceived(const int id, const int progress) {
|
||||
Q_UNUSED(id);
|
||||
emit SongsUpdateProgress(progress);
|
||||
Q_EMIT SongsUpdateProgress(progress);
|
||||
}
|
||||
|
||||
int SpotifyService::Search(const QString &text, StreamingSearchView::SearchType type) {
|
||||
@@ -678,7 +678,7 @@ int SpotifyService::Search(const QString &text, StreamingSearchView::SearchType
|
||||
void SpotifyService::StartSearch() {
|
||||
|
||||
if (!authenticated()) {
|
||||
emit SearchResults(pending_search_id_, SongMap(), tr("Not authenticated with Spotify."));
|
||||
Q_EMIT SearchResults(pending_search_id_, SongMap(), tr("Not authenticated with Spotify."));
|
||||
ShowConfig();
|
||||
return;
|
||||
}
|
||||
@@ -726,7 +726,7 @@ void SpotifyService::SendSearch() {
|
||||
|
||||
void SpotifyService::SearchResultsReceived(const int id, const SongMap &songs, const QString &error) {
|
||||
|
||||
emit SearchResults(id, songs, error);
|
||||
Q_EMIT SearchResults(id, songs, error);
|
||||
search_request_.reset();
|
||||
|
||||
}
|
||||
@@ -742,8 +742,8 @@ void SpotifyService::LoginError(const QString &error, const QVariant &debug) {
|
||||
}
|
||||
if (debug.isValid()) qLog(Debug) << debug;
|
||||
|
||||
emit LoginFailure(error_html);
|
||||
emit LoginComplete(false);
|
||||
Q_EMIT LoginFailure(error_html);
|
||||
Q_EMIT LoginComplete(false);
|
||||
|
||||
login_errors_.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user