diff --git a/src/gui/partresizerwidget.h b/src/gui/partresizerwidget.h index 6e15d20..11b84a1 100644 --- a/src/gui/partresizerwidget.h +++ b/src/gui/partresizerwidget.h @@ -112,7 +112,7 @@ Q_SIGNALS: void firstSectorChanged(qint64); void lastSectorChanged(qint64); -public Q_SLOTS: +public: bool updateFirstSector(qint64 newFirstSector); bool updateLastSector(qint64 newLastSector); bool movePartition(qint64 newFirstSector); diff --git a/src/ops/operation.cpp b/src/ops/operation.cpp index 1e0d385..b2a0e75 100644 --- a/src/ops/operation.cpp +++ b/src/ops/operation.cpp @@ -117,9 +117,9 @@ void Operation::addJob(Job* job) { if (job) { jobs().append(job); - connect(job, SIGNAL(started()), SLOT(onJobStarted())); - connect(job, SIGNAL(progress(int)), SIGNAL(progress(int))); - connect(job, SIGNAL(finished()), SLOT(onJobFinished())); + connect(job, &Job::started, this, &Operation::onJobStarted); + connect(job, &Job::progress, this, &Operation::progress); + connect(job, &Job::finished, this, &Operation::onJobFinished); } } diff --git a/src/ops/operation.h b/src/ops/operation.h index 7750e3f..88d5868 100644 --- a/src/ops/operation.h +++ b/src/ops/operation.h @@ -120,11 +120,10 @@ public: LIBKPMCORE_EXPORT qint32 totalProgress() const; -protected Q_SLOTS: +protected: void onJobStarted(); void onJobFinished(); -protected: void insertPreviewPartition(Device& targetDevice, Partition& newPartition); void removePreviewPartition(Device& device, Partition& p); diff --git a/src/util/externalcommand.cpp b/src/util/externalcommand.cpp index a9bb3a7..7f43b57 100644 --- a/src/util/externalcommand.cpp +++ b/src/util/externalcommand.cpp @@ -63,8 +63,8 @@ void ExternalCommand::setup() setEnvironment(QStringList() << QStringLiteral("LC_ALL=C") << QStringLiteral("PATH=") + QString::fromUtf8(getenv("PATH"))); setProcessChannelMode(MergedChannels); - connect(this, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(onFinished(int))); - connect(this, SIGNAL(readyReadStandardOutput()), SLOT(onReadOutput())); + connect(this, static_cast(&QProcess::finished), this, &ExternalCommand::onFinished); + connect(this, &ExternalCommand::readyReadStandardOutput, this, &ExternalCommand::onReadOutput); } /** Starts the external command. @@ -126,7 +126,8 @@ void ExternalCommand::onReadOutput() *report() << s; } -void ExternalCommand::onFinished(int exitCode) +void ExternalCommand::onFinished(int exitCode, QProcess::ExitStatus exitStatus) { + Q_UNUSED(exitStatus) setExitCode(exitCode); } diff --git a/src/util/externalcommand.h b/src/util/externalcommand.h index c9e4db1..bcca1a7 100644 --- a/src/util/externalcommand.h +++ b/src/util/externalcommand.h @@ -76,8 +76,7 @@ protected: } void setup(); -protected Q_SLOTS: - void onFinished(int exitCode); + void onFinished(int exitCode, QProcess::ExitStatus exitStatus); void onReadOutput(); private: