diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-12-26 21:35:16 +0100 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-12-26 22:00:07 +0100 |
| commit | 46995fd3fd7da4d1b035f71a1279c041b2871ffd (patch) | |
| tree | 788517dbefa88fc1680b05a97e84f0e1d7403815 /src/client/QXmppTransferManager.cpp | |
| parent | 71442ab927cd5c1c235528442fe3706f33e7ff6e (diff) | |
Disable Qt keywords completely
Previously we had the policy that no qt keywords were allowed in headers
that may be included by users. However since there was no automatic test
verifying that in some places keywords were still used.
This now disables qt keywords completely, also in tests and examples. Qt
keywords are in general no good or really good idea as they even
conflict with the standard library (`emit` at least).
In some cases in the examples I just removed the slot tag if the
functions didn't need to be slots (anymore).
Closes #503.
Diffstat (limited to 'src/client/QXmppTransferManager.cpp')
| -rw-r--r-- | src/client/QXmppTransferManager.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/client/QXmppTransferManager.cpp b/src/client/QXmppTransferManager.cpp index ac138986..c4936323 100644 --- a/src/client/QXmppTransferManager.cpp +++ b/src/client/QXmppTransferManager.cpp @@ -339,7 +339,7 @@ void QXmppTransferJob::setLocalFileUrl(const QUrl &localFileUrl) { if (localFileUrl != d->localFileUrl) { d->localFileUrl = localFileUrl; - emit localFileUrlChanged(localFileUrl); + Q_EMIT localFileUrlChanged(localFileUrl); } } @@ -412,17 +412,17 @@ void QXmppTransferJob::setState(QXmppTransferJob::State state) if (d->state == QXmppTransferJob::TransferState) { d->transferStart.start(); } - emit stateChanged(d->state); + Q_EMIT stateChanged(d->state); } } void QXmppTransferJob::_q_terminated() { - emit stateChanged(d->state); + Q_EMIT stateChanged(d->state); if (d->error != NoError) { - emit error(d->error); + Q_EMIT error(d->error); } - emit finished(); + Q_EMIT finished(); } void QXmppTransferJob::terminate(QXmppTransferJob::Error cause) @@ -528,7 +528,7 @@ bool QXmppTransferIncomingJob::writeData(const QByteArray &data) if (!d->fileInfo.hash().isEmpty()) { d->hash.addData(data); } - emit progress(d->done, d->fileInfo.size()); + Q_EMIT progress(d->done, d->fileInfo.size()); return true; } @@ -688,7 +688,7 @@ void QXmppTransferOutgoingJob::_q_sendData() d->socksSocket->write(buffer, length); delete[] buffer; d->done += length; - emit progress(d->done, fileSize()); + Q_EMIT progress(d->done, fileSize()); } } /// \endcond @@ -1073,7 +1073,7 @@ void QXmppTransferManager::ibbResponseReceived(const QXmppIq &iq) client()->sendPacket(dataIq); job->d->done += buffer.size(); - emit job->progress(job->d->done, job->fileSize()); + Q_EMIT job->progress(job->d->done, job->fileSize()); } else { // close the bytestream QXmppIbbCloseIq closeIq; @@ -1173,7 +1173,7 @@ void QXmppTransferManager::_q_jobFinished() return; } - emit jobFinished(job); + Q_EMIT jobFinished(job); } void QXmppTransferManager::_q_jobStateChanged(QXmppTransferJob::State state) @@ -1232,7 +1232,7 @@ void QXmppTransferManager::_q_jobStateChanged(QXmppTransferJob::State state) client()->sendPacket(response); // notify user - emit jobStarted(job); + Q_EMIT jobStarted(job); } /// @@ -1355,7 +1355,7 @@ QXmppTransferJob *QXmppTransferManager::sendFile(const QString &jid, QIODevice * client()->sendPacket(request); // notify user - emit jobStarted(job); + Q_EMIT jobStarted(job); return job; } @@ -1559,7 +1559,7 @@ void QXmppTransferManager::streamInitiationSetReceived(const QXmppStreamInitiati connect(job, &QXmppTransferJob::stateChanged, this, &QXmppTransferManager::_q_jobStateChanged); // allow user to accept or decline the job - emit fileReceived(job); + Q_EMIT fileReceived(job); } QString QXmppTransferManager::proxy() const |
