Commit e10ebf22 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

USe start

parent 9fb9a19c
Pipeline #201346 canceled with stage
in 6 minutes and 1 second
......@@ -44,6 +44,7 @@ void AkonadiDatabaseToolsJob::start()
mProcess = new QProcess(this);
mProcess->setProgram(QStandardPaths::findExecutable(QStringLiteral("akonadictl")));
mProcess->setArguments(QStringList() << QStringLiteral("vacuum"));
connect(mProcess, &QProcess::finished, this, &AkonadiDatabaseToolsJob::deleteLater);
connect(mProcess, &QProcess::readyReadStandardError, this, [this]() {
Q_EMIT receivedStandardError(QLatin1String(mProcess->readAllStandardError()));
});
......@@ -51,9 +52,6 @@ void AkonadiDatabaseToolsJob::start()
Q_EMIT receivedStandardOutput(QLatin1String(mProcess->readAllStandardOutput()));
});
mProcess->start();
if (!mProcess->waitForFinished()) {
qCWarning(AKONADIDATABASETOOLS_LOG) << "Impossible to start akonadi vacuum";
}
// TODO use thread
break;
......@@ -62,6 +60,7 @@ void AkonadiDatabaseToolsJob::start()
mProcess = new QProcess(this);
mProcess->setProgram(QStandardPaths::findExecutable(QStringLiteral("akonadictl")));
mProcess->setArguments(QStringList() << QStringLiteral("fsck"));
connect(mProcess, &QProcess::finished, this, &AkonadiDatabaseToolsJob::deleteLater);
connect(mProcess, &QProcess::readyReadStandardError, this, [this]() {
Q_EMIT receivedStandardError(QLatin1String(mProcess->readAllStandardError()));
});
......@@ -69,13 +68,8 @@ void AkonadiDatabaseToolsJob::start()
Q_EMIT receivedStandardOutput(QLatin1String(mProcess->readAllStandardOutput()));
});
mProcess->start();
if (!mProcess->waitForFinished()) {
qCWarning(AKONADIDATABASETOOLS_LOG) << "Impossible to start akonadi fsck";
}
// TODO use thread
break;
}
}
deleteLater();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment