Compile kpmcore with QT_NO_KEYWORDS.

This commit is contained in:
Andrius Štikonas 2020-09-15 02:36:46 +01:00
parent fbe54e21f3
commit c5c21849b9
12 changed files with 31 additions and 31 deletions

View File

@ -82,8 +82,8 @@ add_definitions(
-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_FROM_BYTEARRAY
-DQT_NO_CAST_TO_BYTEARRAY -DQT_NO_CAST_TO_BYTEARRAY
-DQT_NO_SIGNALS_SLOTS_KEYWORDS
-DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_OPERATOR_PLUS
-DQT_NO_KEYWORDS
) )
kde_enable_exceptions() kde_enable_exceptions()

View File

@ -40,12 +40,12 @@ CoreBackend::~CoreBackend()
void CoreBackend::emitProgress(int i) void CoreBackend::emitProgress(int i)
{ {
emit progress(i); Q_EMIT progress(i);
} }
void CoreBackend::emitScanProgress(const QString& deviceNode, int 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) void CoreBackend::setPartitionTableForDevice(Device& d, PartitionTable* p)

View File

@ -59,7 +59,7 @@ void DeviceScanner::run()
void DeviceScanner::scan() void DeviceScanner::scan()
{ {
emit progress(QString(), 0); Q_EMIT progress(QString(), 0);
clear(); clear();

View File

@ -69,7 +69,7 @@ void OperationRunner::run()
Operation* op = operationStack().operations()[i]; Operation* op = operationStack().operations()[i];
op->setStatus(Operation::StatusRunning); op->setStatus(Operation::StatusRunning);
emit opStarted(i + 1, op); Q_EMIT opStarted(i + 1, op);
connect(op, &Operation::progress, this, &OperationRunner::progressSub); connect(op, &Operation::progress, this, &OperationRunner::progressSub);
@ -78,18 +78,18 @@ void OperationRunner::run()
disconnect(op, &Operation::progress, this, &OperationRunner::progressSub); disconnect(op, &Operation::progress, this, &OperationRunner::progressSub);
emit opFinished(i + 1, op); Q_EMIT opFinished(i + 1, op);
} }
if (automounter) if (automounter)
kdedInterface.call( QStringLiteral("loadModule"), automounterService ); kdedInterface.call( QStringLiteral("loadModule"), automounterService );
if (!status) if (!status)
emit error(); Q_EMIT error();
else if (isCancelling()) else if (isCancelling())
emit cancelled(); Q_EMIT cancelled();
else else
emit finished(); Q_EMIT finished();
} }
/** @return the number of Operations to run */ /** @return the number of Operations to run */

View File

@ -452,9 +452,9 @@ void OperationStack::push(Operation* o)
o->setStatus(Operation::StatusPending); 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. // 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. */ /** 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(); Operation* o = operations().takeLast();
o->undo(); o->undo();
delete o; delete o;
emit operationsChanged(); Q_EMIT operationsChanged();
} }
/** Check whether previous operations involve given partition. /** Check whether previous operations involve given partition.
@ -499,7 +499,7 @@ void OperationStack::clearOperations()
delete o; delete o;
} }
emit operationsChanged(); Q_EMIT operationsChanged();
} }
/** Clears the list of Devices. */ /** Clears the list of Devices. */
@ -509,7 +509,7 @@ void OperationStack::clearDevices()
qDeleteAll(previewDevices()); qDeleteAll(previewDevices());
previewDevices().clear(); previewDevices().clear();
emit devicesChanged(); Q_EMIT devicesChanged();
} }
/** Finds a Device a Partition is on. /** Finds a Device a Partition is on.
@ -549,7 +549,7 @@ void OperationStack::addDevice(Device* d)
QWriteLocker lockDevices(&lock()); QWriteLocker lockDevices(&lock());
previewDevices().append(d); previewDevices().append(d);
emit devicesChanged(); Q_EMIT devicesChanged();
} }
static bool deviceLessThan(const Device* d1, const Device* d2) static bool deviceLessThan(const Device* d1, const Device* d2)
@ -567,5 +567,5 @@ void OperationStack::sortDevices()
std::sort(previewDevices().begin(), previewDevices().end(), deviceLessThan); std::sort(previewDevices().begin(), previewDevices().end(), deviceLessThan);
emit devicesChanged(); Q_EMIT devicesChanged();
} }

View File

@ -278,8 +278,8 @@ bool PartResizerWidget::movePartition(qint64 newFirstSector)
updatePositions(); updatePositions();
emit firstSectorChanged(partition().firstSector()); Q_EMIT firstSectorChanged(partition().firstSector());
emit lastSectorChanged(partition().lastSector()); Q_EMIT lastSectorChanged(partition().lastSector());
return true; return true;
} }
@ -335,7 +335,7 @@ bool PartResizerWidget::updateFirstSector(qint64 newFirstSector)
updatePositions(); updatePositions();
emit firstSectorChanged(partition().firstSector()); Q_EMIT firstSectorChanged(partition().firstSector());
return true; return true;
} }
@ -416,7 +416,7 @@ bool PartResizerWidget::updateLastSector(qint64 newLastSector)
resizeLogicals(0, deltaLast); resizeLogicals(0, deltaLast);
updatePositions(); updatePositions();
emit lastSectorChanged(partition().lastSector()); Q_EMIT lastSectorChanged(partition().lastSector());
return true; return true;
} }

View File

@ -100,7 +100,7 @@ bool Job::rollbackCopyBlocks(Report& report, CopyTarget& origTarget, CopySource&
void Job::emitProgress(int i) void Job::emitProgress(int i)
{ {
emit progress(i); Q_EMIT progress(i);
} }
void Job::updateReport(const QVariantMap& reportString) void Job::updateReport(const QVariantMap& reportString)
@ -110,7 +110,7 @@ void Job::updateReport(const QVariantMap& reportString)
Report* Job::jobStarted(Report& parent) Report* Job::jobStarted(Report& parent)
{ {
emit started(); Q_EMIT started();
return parent.newChild(xi18nc("@info:progress", "Job: %1", description())); 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) void Job::jobFinished(Report& report, bool b)
{ {
setStatus(b ? Status::Success : Status::Error); setStatus(b ? Status::Success : Status::Error);
emit progress(numSteps()); Q_EMIT progress(numSteps());
emit finished(); Q_EMIT finished();
report.setStatus(xi18nc("@info:progress job status (error, warning, ...)", "%1: %2", description(), statusText())); report.setStatus(xi18nc("@info:progress job status (error, warning, ...)", "%1: %2", description(), statusText()));
} }

View File

@ -65,7 +65,7 @@ bool SetPartFlagsJob::run(Report& parent)
int count = 0; int count = 0;
for (const auto &f : PartitionTable::flagList()) { for (const auto &f : PartitionTable::flagList()) {
emit progress(++count); Q_EMIT progress(++count);
const bool oldState = (partition().activeFlags() & f) ? true : false; const bool oldState = (partition().activeFlags() & f) ? true : false;
const bool state = (flags() & f) ? true : false; const bool state = (flags() & f) ? true : false;

View File

@ -141,7 +141,7 @@ void Operation::onJobStarted()
Job* job = qobject_cast<Job*>(sender()); Job* job = qobject_cast<Job*>(sender());
if (job) if (job)
emit jobStarted(job, this); Q_EMIT jobStarted(job, this);
} }
void Operation::onJobFinished() void Operation::onJobFinished()
@ -150,7 +150,7 @@ void Operation::onJobFinished()
if (job) { if (job) {
setProgressBase(progressBase() + job->numSteps()); setProgressBase(progressBase() + job->numSteps());
emit jobFinished(job, this); Q_EMIT jobFinished(job, this);
} }
} }

View File

@ -105,7 +105,7 @@ public:
/**< @return pointer to the Report or nullptr */ /**< @return pointer to the Report or nullptr */
Report* report(); Report* report();
void emitReport(const QVariantMap& report) { emit reportSignal(report); } void emitReport(const QVariantMap& report) { Q_EMIT reportSignal(report); }
// KAuth // KAuth
/**< start ExternalCommand Helper */ /**< start ExternalCommand Helper */
@ -126,7 +126,7 @@ Q_SIGNALS:
void reportSignal(const QVariantMap&); void reportSignal(const QVariantMap&);
public Q_SLOTS: public Q_SLOTS:
void emitProgress(KJob*, unsigned long percent) { emit progress(percent); } void emitProgress(KJob*, unsigned long percent) { Q_EMIT progress(percent); }
private: private:
void setExitCode(int i); void setExitCode(int i);

View File

@ -29,7 +29,7 @@ GlobalLog* GlobalLog::instance()
void GlobalLog::flush(Log::Level lev) void GlobalLog::flush(Log::Level lev)
{ {
emit newMessage(lev, msg); Q_EMIT newMessage(lev, msg);
msg.clear(); msg.clear();
} }

View File

@ -130,7 +130,7 @@ void Report::addOutput(const QString& s)
void Report::emitOutputChanged() void Report::emitOutputChanged()
{ {
emit outputChanged(); Q_EMIT outputChanged();
} }
/** @return the root Report */ /** @return the root Report */