From 6971b49f85d9ddeb2da968a594d65affec3d2b44 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Tue, 10 Mar 2015 02:49:32 +1100 Subject: Lots of Frontend refactoring with a few bug fixes There is still far too much overly convoluted code. However, the introduction of some RAII when dealing with files has made the code-base slightly less error prone. --- heimdall-frontend/source/aboutform.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'heimdall-frontend/source/aboutform.cpp') diff --git a/heimdall-frontend/source/aboutform.cpp b/heimdall-frontend/source/aboutform.cpp index 93e56fb..4be8a1b 100644 --- a/heimdall-frontend/source/aboutform.cpp +++ b/heimdall-frontend/source/aboutform.cpp @@ -60,11 +60,11 @@ void AboutForm::RetrieveHeimdallVersion(void) QStringList paths; // Ensure /usr/bin is in PATH - for (int i = 0; i < environment.length(); i++) + for (const QString& var : environment) { - if (environment[i].left(5) == "PATH=") + if (var.left(5) == "PATH=") { - paths = environment[i].mid(5).split(':'); + paths = var.mid(5).split(':'); paths.prepend("/usr/bin"); break; } -- cgit v1.2.3