[sdk/kde-builder] kde_builder_lib: chore: Rename variables in StatusView for understandability

Andrew Shark <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 193dfb5b4633d79e044f54d4d0b25d9a87fb934e by Andrew Shark.
Committed on 25/07/2026 at 15:23.
Pushed by ashark into branch 'master'.

chore: Rename variables in StatusView for understandability

M  +3    -3    kde_builder_lib/build_system/build_system.py
M  +2    -2    kde_builder_lib/module/module.py
M  +9    -9    kde_builder_lib/status_view.py

https://invent.kde.org/sdk/kde-builder/-/commit/193dfb5b4633d79e044f54d4d0b25d9a87fb934e

diff --git a/kde_builder_lib/build_system/build_system.py b/kde_builder_lib/build_system/build_system.py
index 31de9354..bbe8b986 100644
--- a/kde_builder_lib/build_system/build_system.py
+++ b/kde_builder_lib/build_system/build_system.py
@@ -457,7 +457,7 @@ class BuildSystem:
         status_viewer.status = Debug().colorize(f"\t{message}")
         status_viewer.update()
 
-        if logger_logged_cmd.level == logging.INFO and ctx.status_view.cur_progress == -1:
+        if logger_logged_cmd.level == logging.INFO and ctx.status_view.current_project_cur_progress == -1:
             # When user configured logged-command logger to not print the output of the command to console (i.e. logged-command level is higher than DEBUG), but still print the info of started and finished logged command,
             # (i.e. logged-command level is lower than WARNING), in other words, when logged-command level is INFO, the user will want to see the initial status message.
             # status_viewer lines are assumed to be overwritten by some line at the end. For example, the initial status line is "        Installing ark". It then is replaced by progress status line "66.7%   Installing ark".
@@ -479,7 +479,7 @@ class BuildSystem:
                 percentage = int(match.group(1))
 
             if percentage:
-                status_viewer.progress_total = 100
+                status_viewer.current_project_full_progress = 100
                 status_viewer.set_progress(percentage)
             else:
                 x, y = None, None
@@ -489,7 +489,7 @@ class BuildSystem:
 
                 if x and y:
                     # ninja-syntax
-                    status_viewer.progress_total = y
+                    status_viewer.current_project_full_progress = y
                     status_viewer.set_progress(x)
 
             if "warning: " in input_line:
diff --git a/kde_builder_lib/module/module.py b/kde_builder_lib/module/module.py
index f1df6690..dca9eb35 100644
--- a/kde_builder_lib/module/module.py
+++ b/kde_builder_lib/module/module.py
@@ -262,8 +262,8 @@ class Module(OptionsBase):
         # Clear the progress values after build process, so they do not influence on initial progress of install process.
         # This is needed because currently the install() is invoked from build().
         sv = self.context.status_view
-        sv.cur_progress = -1
-        sv.progress_total = -1
+        sv.current_project_cur_progress = -1
+        sv.current_project_full_progress = -1
         sv.status = ""
 
         # TODO: this should be a phase to run.
diff --git a/kde_builder_lib/status_view.py b/kde_builder_lib/status_view.py
index aafb2eb8..adfb5603 100644
--- a/kde_builder_lib/status_view.py
+++ b/kde_builder_lib/status_view.py
@@ -19,8 +19,8 @@ class StatusView:
     """
 
     def __init__(self):
-        self.cur_progress = -1
-        self.progress_total = -1
+        self.current_project_cur_progress = -1
+        self.current_project_full_progress = -1
         """
         The total amount of progress deemed possible.
         """
@@ -47,8 +47,8 @@ class StatusView:
         """
         Set the amount of progress made vs. the total progress possible.
         """
-        old_progress = self.cur_progress
-        self.cur_progress = new_progress
+        old_progress = self.current_project_cur_progress
+        self.current_project_cur_progress = new_progress
 
         if old_progress != new_progress:
             self.update()
@@ -59,7 +59,7 @@ class StatusView:
 
         E.g. for TTY it clears the line and redisplays the current stats.
         """
-        progress_total = self.progress_total
+        current_project_full_progress = self.current_project_full_progress
 
         mod_total, mod_success, mod_failed = self.mod_total, self.mod_success, self.mod_failed
 
@@ -75,14 +75,14 @@ class StatusView:
 
             status_line = status_line + f" ({tail_msg})"
 
-        if progress_total > 0:
-            msg = f"{self.cur_progress * 100 / progress_total:.1f}%{status_line}"
+        if current_project_full_progress > 0:
+            msg = f"{self.current_project_cur_progress * 100 / current_project_full_progress:.1f}%{status_line}"
 
-        elif self.cur_progress < 0:
+        elif self.current_project_cur_progress < 0:
             msg = status_line
         else:
             spinner = "-\\|/"
-            msg = spinner[self.cur_progress % len(spinner)] + status_line
+            msg = spinner[self.current_project_cur_progress % len(spinner)] + status_line
 
         StatusView._clear_line_and_update(msg)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.