From fe68b45fc56f20ae1152bc10beb308fe06deba54 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 13 Apr 2024 23:37:49 +0200 Subject: [PATCH] [libcalamares] Explain updating-status-text mechanism --- src/libcalamares/JobQueue.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcalamares/JobQueue.cpp b/src/libcalamares/JobQueue.cpp index 64cb10e88..c7548cc5c 100644 --- a/src/libcalamares/JobQueue.cpp +++ b/src/libcalamares/JobQueue.cpp @@ -188,6 +188,13 @@ private: // starts the job, or if the job itself reports 0.0) be more // accepting in what gets reported: jobs with no status fall // back to description and name, whichever is non-empty. + // + // Later calls (e.g. when percentage > 0) use the status unchanged. + // It may be empty, but the ExecutionViewStep knows about empty + // status messages and does not update the text in that case. + // + // This means that a Job can implement just prettyName() and get + // a reasonable "status" message which will update only once. if ( percentage == 0.0 && message.isEmpty() ) { message = jobitem.job->prettyDescription();