Commit 64cfcfba authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

rpm-ostree: Simplify toggle fetching state

Keep it local to the function that fetches so it's clear when it's done.
parent 33d31c2b
...@@ -152,6 +152,7 @@ void RpmOstreeBackend::executeCheckUpdateProcess() ...@@ -152,6 +152,7 @@ void RpmOstreeBackend::executeCheckUpdateProcess()
QByteArray readError = process->readAllStandardError(); QByteArray readError = process->readAllStandardError();
}); });
toggleFetching();
// delete process instance when done, and get the exit status to handle errors. // delete process instance when done, and get the exit status to handle errors.
connect(process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [this, process](int exitCode, QProcess::ExitStatus exitStatus) { connect(process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [this, process](int exitCode, QProcess::ExitStatus exitStatus) {
qWarning() << "process exited with code " << exitCode << exitStatus; qWarning() << "process exited with code " << exitCode << exitStatus;
...@@ -288,7 +289,6 @@ void RpmOstreeBackend::checkForUpdates() ...@@ -288,7 +289,6 @@ void RpmOstreeBackend::checkForUpdates()
return; return;
executeCheckUpdateProcess(); executeCheckUpdateProcess();
executeRemoteRefsProcess(); executeRemoteRefsProcess();
QTimer::singleShot(500, this, &RpmOstreeBackend::toggleFetching);
} }
void RpmOstreeBackend::perfromSystemUpgrade(QString selectedRefs) void RpmOstreeBackend::perfromSystemUpgrade(QString selectedRefs)
......
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