Skip to content

Commit

Permalink
emit -> Q_EMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
zzag committed Apr 17, 2022
1 parent bf20283 commit 96750f2
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/declarative/dynamicwallpapercrawler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void DynamicWallpaperCrawler::visitFolder(const QString &filePath)
for (const QFileInfo &fileInfo : fileInfos) {
if (fileInfo.isDir()) {
if (checkPackage(fileInfo.filePath())) {
emit foundPackage(fileInfo.filePath(), token());
Q_EMIT foundPackage(fileInfo.filePath(), token());
} else {
visitFolder(fileInfo.filePath());
}
Expand All @@ -108,7 +108,7 @@ void DynamicWallpaperCrawler::visitFile(const QString &filePath)
// determine whether filePath actually points to a dynamic wallpaper file.
KDynamicWallpaperReader reader(filePath);
if (reader.error() == KDynamicWallpaperReader::NoError)
emit foundFile(filePath, token());
Q_EMIT foundFile(filePath, token());
}

bool DynamicWallpaperCrawler::checkPackage(const QString &filePath) const
Expand Down
14 changes: 7 additions & 7 deletions src/declarative/dynamicwallpaperhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void DynamicWallpaperHandler::setLocation(const QGeoCoordinate &coordinate)
m_location = coordinate;
reloadEngine();
scheduleUpdate();
emit locationChanged();
Q_EMIT locationChanged();
}

QGeoCoordinate DynamicWallpaperHandler::location() const
Expand Down Expand Up @@ -108,7 +108,7 @@ void DynamicWallpaperHandler::setSource(const QUrl &url)
reloadDescription();
reloadEngine();
scheduleUpdate();
emit sourceChanged();
Q_EMIT sourceChanged();
}

QUrl DynamicWallpaperHandler::source() const
Expand All @@ -121,7 +121,7 @@ void DynamicWallpaperHandler::setTopLayer(const QUrl &url)
if (m_topLayer == url)
return;
m_topLayer = url;
emit topLayerChanged();
Q_EMIT topLayerChanged();
}

QUrl DynamicWallpaperHandler::topLayer() const
Expand All @@ -134,7 +134,7 @@ void DynamicWallpaperHandler::setBottomLayer(const QUrl &url)
if (m_bottomLayer == url)
return;
m_bottomLayer = url;
emit bottomLayerChanged();
Q_EMIT bottomLayerChanged();
}

QUrl DynamicWallpaperHandler::bottomLayer() const
Expand All @@ -147,7 +147,7 @@ void DynamicWallpaperHandler::setBlendFactor(qreal blendFactor)
if (m_blendFactor == blendFactor)
return;
m_blendFactor = blendFactor;
emit blendFactorChanged();
Q_EMIT blendFactorChanged();
}

qreal DynamicWallpaperHandler::blendFactor() const
Expand All @@ -160,7 +160,7 @@ void DynamicWallpaperHandler::setStatus(Status status)
if (m_status == status)
return;
m_status = status;
emit statusChanged();
Q_EMIT statusChanged();
}

DynamicWallpaperHandler::Status DynamicWallpaperHandler::status() const
Expand All @@ -173,7 +173,7 @@ void DynamicWallpaperHandler::setErrorString(const QString &text)
if (m_errorString == text)
return;
m_errorString = text;
emit errorStringChanged();
Q_EMIT errorStringChanged();
}

QString DynamicWallpaperHandler::errorString() const
Expand Down
2 changes: 1 addition & 1 deletion src/declarative/dynamicwallpaperimageprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void DynamicWallpaperAsyncImageResponse::handleFinished()
else
m_errorString = result.errorString;

emit finished();
Q_EMIT finished();
}

QQuickTextureFactory *DynamicWallpaperAsyncImageResponse::textureFactory() const
Expand Down
4 changes: 2 additions & 2 deletions src/declarative/dynamicwallpapermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void DynamicWallpaperModelPrivate::internalScheduleRemove(const QModelIndex &ind
if (wallpapers[row]->isZombie == set)
return;
wallpapers[row]->isZombie = set;
emit q->dataChanged(index, index, { DynamicWallpaperModel::WallpaperIsZombieRole });
Q_EMIT q->dataChanged(index, index, { DynamicWallpaperModel::WallpaperIsZombieRole });
}

void DynamicWallpaperModelPrivate::internalRemove(const QModelIndex &index)
Expand Down Expand Up @@ -506,7 +506,7 @@ void DynamicWallpaperModel::handleProberFinished(const QUrl &fileUrl)

void DynamicWallpaperModel::handleProberFailed(const QUrl &fileUrl)
{
emit errorOccurred(i18n("%1 is not a dynamic wallpaper", fileUrl.toLocalFile()));
Q_EMIT errorOccurred(i18n("%1 is not a dynamic wallpaper", fileUrl.toLocalFile()));
}

/*!
Expand Down
4 changes: 2 additions & 2 deletions src/declarative/dynamicwallpaperpreviewjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ void DynamicWallpaperPreviewJob::handleFinished()
{
const DynamicWallpaperImageAsyncResult response = d->watcher->result();
if (response.errorString.isNull())
emit finished(response.image);
Q_EMIT finished(response.image);
else
emit failed(response.errorString);
Q_EMIT failed(response.errorString);

deleteLater();
}
4 changes: 2 additions & 2 deletions src/declarative/dynamicwallpaperpreviewprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ QQuickTextureFactory *AsyncImageResponse::textureFactory() const
void AsyncImageResponse::handleFinished(const QImage &image)
{
m_image = image;
emit finished();
Q_EMIT finished();
}

void AsyncImageResponse::handleFailed(const QString &errorString)
{
m_errorString = errorString;
emit finished();
Q_EMIT finished();
}

static QString fileNameFromBase64(const QString &base64)
Expand Down
4 changes: 2 additions & 2 deletions src/declarative/dynamicwallpaperprober.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ void DynamicWallpaperProber::run()
{
const KDynamicWallpaperReader reader(m_fileUrl.toLocalFile());
if (reader.error() == KDynamicWallpaperReader::NoError)
emit finished(m_fileUrl);
Q_EMIT finished(m_fileUrl);
else
emit failed(m_fileUrl);
Q_EMIT failed(m_fileUrl);

deleteLater();
}
2 changes: 1 addition & 1 deletion src/lib/ksystemclockmonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void KSystemClockMonitor::setActive(bool set)
else
d->unloadMonitorEngine();

emit activeChanged();
Q_EMIT activeChanged();
}

/*!
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ksystemclockmonitorengine_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ void KLinuxSystemClockMonitorEngine::handleTimerCancelled()
return;
}

emit systemClockChanged();
Q_EMIT systemClockChanged();
}

0 comments on commit 96750f2

Please sign in to comment.