From c5c21849b9cffcca2387d66a081731d2cdc4ae4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Tue, 15 Sep 2020 02:36:46 +0100 Subject: [PATCH] Compile kpmcore with QT_NO_KEYWORDS. --- CMakeLists.txt | 2 +- src/backend/corebackend.cpp | 4 ++-- src/core/devicescanner.cpp | 2 +- src/core/operationrunner.cpp | 10 +++++----- src/core/operationstack.cpp | 14 +++++++------- src/gui/partresizerwidget.cpp | 8 ++++---- src/jobs/job.cpp | 8 ++++---- src/jobs/setpartflagsjob.cpp | 2 +- src/ops/operation.cpp | 4 ++-- src/util/externalcommand.h | 4 ++-- src/util/globallog.cpp | 2 +- src/util/report.cpp | 2 +- 12 files changed, 31 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfc878f..541b673 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,8 +82,8 @@ add_definitions( -DQT_NO_URL_CAST_FROM_STRING -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_BYTEARRAY - -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_USE_FAST_OPERATOR_PLUS + -DQT_NO_KEYWORDS ) kde_enable_exceptions() diff --git a/src/backend/corebackend.cpp b/src/backend/corebackend.cpp index fbd3410..e6ab9ee 100644 --- a/src/backend/corebackend.cpp +++ b/src/backend/corebackend.cpp @@ -40,12 +40,12 @@ CoreBackend::~CoreBackend() void CoreBackend::emitProgress(int i) { - emit progress(i); + Q_EMIT progress(i); } void CoreBackend::emitScanProgress(const QString& deviceNode, int i) { - emit scanProgress(deviceNode, i); + Q_EMIT scanProgress(deviceNode, i); } void CoreBackend::setPartitionTableForDevice(Device& d, PartitionTable* p) diff --git a/src/core/devicescanner.cpp b/src/core/devicescanner.cpp index bff979b..d3944de 100644 --- a/src/core/devicescanner.cpp +++ b/src/core/devicescanner.cpp @@ -59,7 +59,7 @@ void DeviceScanner::run() void DeviceScanner::scan() { - emit progress(QString(), 0); + Q_EMIT progress(QString(), 0); clear(); diff --git a/src/core/operationrunner.cpp b/src/core/operationrunner.cpp index 1880bf6..55a9d14 100644 --- a/src/core/operationrunner.cpp +++ b/src/core/operationrunner.cpp @@ -69,7 +69,7 @@ void OperationRunner::run() Operation* op = operationStack().operations()[i]; op->setStatus(Operation::StatusRunning); - emit opStarted(i + 1, op); + Q_EMIT opStarted(i + 1, op); connect(op, &Operation::progress, this, &OperationRunner::progressSub); @@ -78,18 +78,18 @@ void OperationRunner::run() disconnect(op, &Operation::progress, this, &OperationRunner::progressSub); - emit opFinished(i + 1, op); + Q_EMIT opFinished(i + 1, op); } if (automounter) kdedInterface.call( QStringLiteral("loadModule"), automounterService ); if (!status) - emit error(); + Q_EMIT error(); else if (isCancelling()) - emit cancelled(); + Q_EMIT cancelled(); else - emit finished(); + Q_EMIT finished(); } /** @return the number of Operations to run */ diff --git a/src/core/operationstack.cpp b/src/core/operationstack.cpp index 0a9b9f5..2ccdc08 100644 --- a/src/core/operationstack.cpp +++ b/src/core/operationstack.cpp @@ -452,9 +452,9 @@ void OperationStack::push(Operation* o) o->setStatus(Operation::StatusPending); } - // emit operationsChanged even if o is nullptr because it has been merged: merging might + // Q_EMIT operationsChanged even if o is nullptr because it has been merged: merging might // have led to an existing operation changing. - emit operationsChanged(); + Q_EMIT operationsChanged(); } /** Removes the topmost Operation from the OperationStack, calls Operation::undo() on it and deletes it. */ @@ -463,7 +463,7 @@ void OperationStack::pop() Operation* o = operations().takeLast(); o->undo(); delete o; - emit operationsChanged(); + Q_EMIT operationsChanged(); } /** Check whether previous operations involve given partition. @@ -499,7 +499,7 @@ void OperationStack::clearOperations() delete o; } - emit operationsChanged(); + Q_EMIT operationsChanged(); } /** Clears the list of Devices. */ @@ -509,7 +509,7 @@ void OperationStack::clearDevices() qDeleteAll(previewDevices()); previewDevices().clear(); - emit devicesChanged(); + Q_EMIT devicesChanged(); } /** Finds a Device a Partition is on. @@ -549,7 +549,7 @@ void OperationStack::addDevice(Device* d) QWriteLocker lockDevices(&lock()); previewDevices().append(d); - emit devicesChanged(); + Q_EMIT devicesChanged(); } static bool deviceLessThan(const Device* d1, const Device* d2) @@ -567,5 +567,5 @@ void OperationStack::sortDevices() std::sort(previewDevices().begin(), previewDevices().end(), deviceLessThan); - emit devicesChanged(); + Q_EMIT devicesChanged(); } diff --git a/src/gui/partresizerwidget.cpp b/src/gui/partresizerwidget.cpp index 662b0b5..2f17d2f 100644 --- a/src/gui/partresizerwidget.cpp +++ b/src/gui/partresizerwidget.cpp @@ -278,8 +278,8 @@ bool PartResizerWidget::movePartition(qint64 newFirstSector) updatePositions(); - emit firstSectorChanged(partition().firstSector()); - emit lastSectorChanged(partition().lastSector()); + Q_EMIT firstSectorChanged(partition().firstSector()); + Q_EMIT lastSectorChanged(partition().lastSector()); return true; } @@ -335,7 +335,7 @@ bool PartResizerWidget::updateFirstSector(qint64 newFirstSector) updatePositions(); - emit firstSectorChanged(partition().firstSector()); + Q_EMIT firstSectorChanged(partition().firstSector()); return true; } @@ -416,7 +416,7 @@ bool PartResizerWidget::updateLastSector(qint64 newLastSector) resizeLogicals(0, deltaLast); updatePositions(); - emit lastSectorChanged(partition().lastSector()); + Q_EMIT lastSectorChanged(partition().lastSector()); return true; } diff --git a/src/jobs/job.cpp b/src/jobs/job.cpp index c6708be..fc2d3a8 100644 --- a/src/jobs/job.cpp +++ b/src/jobs/job.cpp @@ -100,7 +100,7 @@ bool Job::rollbackCopyBlocks(Report& report, CopyTarget& origTarget, CopySource& void Job::emitProgress(int i) { - emit progress(i); + Q_EMIT progress(i); } void Job::updateReport(const QVariantMap& reportString) @@ -110,7 +110,7 @@ void Job::updateReport(const QVariantMap& reportString) Report* Job::jobStarted(Report& parent) { - emit started(); + Q_EMIT started(); return parent.newChild(xi18nc("@info:progress", "Job: %1", description())); } @@ -118,8 +118,8 @@ Report* Job::jobStarted(Report& parent) void Job::jobFinished(Report& report, bool b) { setStatus(b ? Status::Success : Status::Error); - emit progress(numSteps()); - emit finished(); + Q_EMIT progress(numSteps()); + Q_EMIT finished(); report.setStatus(xi18nc("@info:progress job status (error, warning, ...)", "%1: %2", description(), statusText())); } diff --git a/src/jobs/setpartflagsjob.cpp b/src/jobs/setpartflagsjob.cpp index fceb583..47075d6 100644 --- a/src/jobs/setpartflagsjob.cpp +++ b/src/jobs/setpartflagsjob.cpp @@ -65,7 +65,7 @@ bool SetPartFlagsJob::run(Report& parent) int count = 0; for (const auto &f : PartitionTable::flagList()) { - emit progress(++count); + Q_EMIT progress(++count); const bool oldState = (partition().activeFlags() & f) ? true : false; const bool state = (flags() & f) ? true : false; diff --git a/src/ops/operation.cpp b/src/ops/operation.cpp index 485b58b..eb73161 100644 --- a/src/ops/operation.cpp +++ b/src/ops/operation.cpp @@ -141,7 +141,7 @@ void Operation::onJobStarted() Job* job = qobject_cast(sender()); if (job) - emit jobStarted(job, this); + Q_EMIT jobStarted(job, this); } void Operation::onJobFinished() @@ -150,7 +150,7 @@ void Operation::onJobFinished() if (job) { setProgressBase(progressBase() + job->numSteps()); - emit jobFinished(job, this); + Q_EMIT jobFinished(job, this); } } diff --git a/src/util/externalcommand.h b/src/util/externalcommand.h index 723f03e..9db9d7c 100644 --- a/src/util/externalcommand.h +++ b/src/util/externalcommand.h @@ -105,7 +105,7 @@ public: /**< @return pointer to the Report or nullptr */ Report* report(); - void emitReport(const QVariantMap& report) { emit reportSignal(report); } + void emitReport(const QVariantMap& report) { Q_EMIT reportSignal(report); } // KAuth /**< start ExternalCommand Helper */ @@ -126,7 +126,7 @@ Q_SIGNALS: void reportSignal(const QVariantMap&); public Q_SLOTS: - void emitProgress(KJob*, unsigned long percent) { emit progress(percent); } + void emitProgress(KJob*, unsigned long percent) { Q_EMIT progress(percent); } private: void setExitCode(int i); diff --git a/src/util/globallog.cpp b/src/util/globallog.cpp index 73ac63f..40c21e2 100644 --- a/src/util/globallog.cpp +++ b/src/util/globallog.cpp @@ -29,7 +29,7 @@ GlobalLog* GlobalLog::instance() void GlobalLog::flush(Log::Level lev) { - emit newMessage(lev, msg); + Q_EMIT newMessage(lev, msg); msg.clear(); } diff --git a/src/util/report.cpp b/src/util/report.cpp index 1449333..9469839 100644 --- a/src/util/report.cpp +++ b/src/util/report.cpp @@ -130,7 +130,7 @@ void Report::addOutput(const QString& s) void Report::emitOutputChanged() { - emit outputChanged(); + Q_EMIT outputChanged(); } /** @return the root Report */