Convert to new syntax and slots syntax.
This commit is contained in:
parent
8d178a2a86
commit
45654e5e83
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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<void(QProcess::*)(int, QProcess::ExitStatus)>(&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);
|
||||
}
|
||||
|
|
|
@ -76,8 +76,7 @@ protected:
|
|||
}
|
||||
void setup();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void onFinished(int exitCode);
|
||||
void onFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void onReadOutput();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue