From 63c9a80c91ccfb47aa96e1f65db0e8ae640fc678 Mon Sep 17 00:00:00 2001
From: Alice Russell <Alice.Russell@tessella.com>
Date: Thu, 30 Jan 2020 12:02:35 +0000
Subject: [PATCH] Re #27586 Make suggested changes

Change to preincrement variable and rename a variable to be more descriptive
---
 qt/widgets/common/src/SelectFunctionDialog.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/qt/widgets/common/src/SelectFunctionDialog.cpp b/qt/widgets/common/src/SelectFunctionDialog.cpp
index b6880bc5e21..b5bd7db0180 100644
--- a/qt/widgets/common/src/SelectFunctionDialog.cpp
+++ b/qt/widgets/common/src/SelectFunctionDialog.cpp
@@ -112,15 +112,15 @@ void SelectFunctionDialog::constructFunctionTree(
         // go through the path and add the folders if they don't already exist
         QString currentPath = subCategories[0];
         QTreeWidgetItem *catItem = nullptr;
-        int n = subCategories.size();
+        int subCategoryNo = subCategories.size();
         bool show = false;
-        for (int j = 0; j < n; j++) {
+        for (int j = 0; j < subCategoryNo; ++j) {
           if (showCategory(subCategories[j].toStdString())) {
             show = true;
           }
         }
         if (show) {
-          for (int j = 0; j < n; j++) {
+          for (int j = 0; j < subCategoryNo; ++j) {
             if (categories.contains(currentPath)) {
               catItem = categories[currentPath];
             } else {
@@ -134,7 +134,7 @@ void SelectFunctionDialog::constructFunctionTree(
               }
               catItem = newCatItem;
             }
-            if (j != n - 1)
+            if (j != subCategoryNo - 1)
               currentPath += "\\" + subCategories[j + 1];
             else {
               // This is the end of the path so add the functions
-- 
GitLab