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 firstSectorChanged(qint64);
|
||||||
void lastSectorChanged(qint64);
|
void lastSectorChanged(qint64);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public:
|
||||||
bool updateFirstSector(qint64 newFirstSector);
|
bool updateFirstSector(qint64 newFirstSector);
|
||||||
bool updateLastSector(qint64 newLastSector);
|
bool updateLastSector(qint64 newLastSector);
|
||||||
bool movePartition(qint64 newFirstSector);
|
bool movePartition(qint64 newFirstSector);
|
||||||
|
|
|
@ -117,9 +117,9 @@ void Operation::addJob(Job* job)
|
||||||
{
|
{
|
||||||
if (job) {
|
if (job) {
|
||||||
jobs().append(job);
|
jobs().append(job);
|
||||||
connect(job, SIGNAL(started()), SLOT(onJobStarted()));
|
connect(job, &Job::started, this, &Operation::onJobStarted);
|
||||||
connect(job, SIGNAL(progress(int)), SIGNAL(progress(int)));
|
connect(job, &Job::progress, this, &Operation::progress);
|
||||||
connect(job, SIGNAL(finished()), SLOT(onJobFinished()));
|
connect(job, &Job::finished, this, &Operation::onJobFinished);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,11 +120,10 @@ public:
|
||||||
|
|
||||||
LIBKPMCORE_EXPORT qint32 totalProgress() const;
|
LIBKPMCORE_EXPORT qint32 totalProgress() const;
|
||||||
|
|
||||||
protected Q_SLOTS:
|
protected:
|
||||||
void onJobStarted();
|
void onJobStarted();
|
||||||
void onJobFinished();
|
void onJobFinished();
|
||||||
|
|
||||||
protected:
|
|
||||||
void insertPreviewPartition(Device& targetDevice, Partition& newPartition);
|
void insertPreviewPartition(Device& targetDevice, Partition& newPartition);
|
||||||
void removePreviewPartition(Device& device, Partition& p);
|
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")));
|
setEnvironment(QStringList() << QStringLiteral("LC_ALL=C") << QStringLiteral("PATH=") + QString::fromUtf8(getenv("PATH")));
|
||||||
setProcessChannelMode(MergedChannels);
|
setProcessChannelMode(MergedChannels);
|
||||||
|
|
||||||
connect(this, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(onFinished(int)));
|
connect(this, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &ExternalCommand::onFinished);
|
||||||
connect(this, SIGNAL(readyReadStandardOutput()), SLOT(onReadOutput()));
|
connect(this, &ExternalCommand::readyReadStandardOutput, this, &ExternalCommand::onReadOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Starts the external command.
|
/** Starts the external command.
|
||||||
|
@ -126,7 +126,8 @@ void ExternalCommand::onReadOutput()
|
||||||
*report() << s;
|
*report() << s;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExternalCommand::onFinished(int exitCode)
|
void ExternalCommand::onFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(exitStatus)
|
||||||
setExitCode(exitCode);
|
setExitCode(exitCode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,8 +76,7 @@ protected:
|
||||||
}
|
}
|
||||||
void setup();
|
void setup();
|
||||||
|
|
||||||
protected Q_SLOTS:
|
void onFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||||
void onFinished(int exitCode);
|
|
||||||
void onReadOutput();
|
void onReadOutput();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue