Replace emit with Q_EMIT
This commit is contained in:
@@ -53,7 +53,7 @@ void RadioBackend::Exit() {
|
||||
Q_ASSERT(QThread::currentThread() == thread());
|
||||
|
||||
moveToThread(original_thread_);
|
||||
emit ExitFinished();
|
||||
Q_EMIT ExitFinished();
|
||||
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ void RadioBackend::AddChannels(const RadioChannelList &channels) {
|
||||
}
|
||||
}
|
||||
|
||||
emit NewChannels(channels);
|
||||
Q_EMIT NewChannels(channels);
|
||||
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ void RadioBackend::GetChannels() {
|
||||
channels << channel;
|
||||
}
|
||||
|
||||
emit NewChannels(channels);
|
||||
Q_EMIT NewChannels(channels);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ void RadioModel::AlbumCoverLoaded(const quint64 id, const AlbumCoverLoaderResult
|
||||
const QModelIndex idx = ItemToIndex(item);
|
||||
if (!idx.isValid()) return;
|
||||
|
||||
emit dataChanged(idx, idx);
|
||||
Q_EMIT dataChanged(idx, idx);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -76,14 +76,14 @@ void RadioParadiseService::GetChannelsReply(QNetworkReply *reply, const int task
|
||||
QJsonObject object = ExtractJsonObj(reply);
|
||||
if (object.isEmpty()) {
|
||||
app_->task_manager()->SetTaskFinished(task_id);
|
||||
emit NewChannels();
|
||||
Q_EMIT NewChannels();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!object.contains(QLatin1String("channels")) || !object[QLatin1String("channels")].isArray()) {
|
||||
Error(QStringLiteral("Missing JSON channels array."), object);
|
||||
app_->task_manager()->SetTaskFinished(task_id);
|
||||
emit NewChannels();
|
||||
Q_EMIT NewChannels();
|
||||
return;
|
||||
}
|
||||
const QJsonArray array_channels = object[QLatin1String("channels")].toArray();
|
||||
@@ -123,6 +123,6 @@ void RadioParadiseService::GetChannelsReply(QNetworkReply *reply, const int task
|
||||
|
||||
app_->task_manager()->SetTaskFinished(task_id);
|
||||
|
||||
emit NewChannels(channels);
|
||||
Q_EMIT NewChannels(channels);
|
||||
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ RadioView::~RadioView() { delete menu_; }
|
||||
void RadioView::showEvent(QShowEvent*) {
|
||||
|
||||
if (!initialized_) {
|
||||
emit GetChannels();
|
||||
Q_EMIT GetChannels();
|
||||
initialized_ = true;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ void RadioView::AddToPlaylist() {
|
||||
const QModelIndexList selected_indexes = selectedIndexes();
|
||||
if (selected_indexes.isEmpty()) return;
|
||||
|
||||
emit AddToPlaylistSignal(model()->mimeData(selected_indexes));
|
||||
Q_EMIT AddToPlaylistSignal(model()->mimeData(selected_indexes));
|
||||
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ void RadioView::ReplacePlaylist() {
|
||||
mimedata->clear_first_ = true;
|
||||
}
|
||||
|
||||
emit AddToPlaylistSignal(qmimedata);
|
||||
Q_EMIT AddToPlaylistSignal(qmimedata);
|
||||
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ void RadioView::OpenInNewPlaylist() {
|
||||
}
|
||||
}
|
||||
|
||||
emit AddToPlaylistSignal(qmimedata);
|
||||
Q_EMIT AddToPlaylistSignal(qmimedata);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -84,14 +84,14 @@ void SomaFMService::GetChannelsReply(QNetworkReply *reply, const int task_id) {
|
||||
QJsonObject object = ExtractJsonObj(reply);
|
||||
if (object.isEmpty()) {
|
||||
app_->task_manager()->SetTaskFinished(task_id);
|
||||
emit NewChannels();
|
||||
Q_EMIT NewChannels();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!object.contains(QLatin1String("channels")) || !object[QLatin1String("channels")].isArray()) {
|
||||
Error(QStringLiteral("Missing JSON channels array."), object);
|
||||
app_->task_manager()->SetTaskFinished(task_id);
|
||||
emit NewChannels();
|
||||
Q_EMIT NewChannels();
|
||||
return;
|
||||
}
|
||||
const QJsonArray array_channels = object[QLatin1String("channels")].toArray();
|
||||
@@ -128,7 +128,7 @@ void SomaFMService::GetChannelsReply(QNetworkReply *reply, const int task_id) {
|
||||
|
||||
if (channels.isEmpty()) {
|
||||
app_->task_manager()->SetTaskFinished(task_id);
|
||||
emit NewChannels();
|
||||
Q_EMIT NewChannels();
|
||||
}
|
||||
else {
|
||||
for (const RadioChannel &channel : std::as_const(channels)) {
|
||||
@@ -162,7 +162,7 @@ void SomaFMService::GetStreamUrlsReply(QNetworkReply *reply, const int task_id,
|
||||
|
||||
if (replies_.isEmpty()) {
|
||||
app_->task_manager()->SetTaskFinished(task_id);
|
||||
emit NewChannels(channels_);
|
||||
Q_EMIT NewChannels(channels_);
|
||||
channels_.clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user