From 676e0d2c7088d3f9f682aff8b2e969e9465193ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 15 Aug 2010 08:11:32 +0200 Subject: [PATCH] astyle formatting --- gui/applicationlist.cpp | 48 +++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/gui/applicationlist.cpp b/gui/applicationlist.cpp index b4e453afb..143ac436a 100644 --- a/gui/applicationlist.cpp +++ b/gui/applicationlist.cpp @@ -38,29 +38,31 @@ void ApplicationList::LoadSettings(QSettings *programSettings) QStringList names = programSettings->value(SETTINGS_APPLICATION_NAMES, QStringList()).toStringList(); QStringList paths = programSettings->value(SETTINGS_APPLICATION_PATHS, QStringList()).toStringList(); - if (names.empty() && paths.empty()) - { - do { - // use as default for gnome environments - if (QFileInfo("/usr/bin/gedit").isExecutable()) - { - AddApplicationType("gedit", "/usr/bin/gedit +(line) (file)"); - break; - } - // use as default for kde environments - if (QFileInfo("/usr/bin/kate").isExecutable()) - { - AddApplicationType("kate", "/usr/bin/kate -l(line) (file)"); - break; - } - // use as default for windows environments - if (QFileInfo("%PROGRAMFILES%\\Notepad++\\notepad++.exe").isExecutable()) - { - AddApplicationType("notepad++", "%PROGRAMFILES%\\Notepad++\\notepad++.exe -n(line) (file)"); - break; - } - } while ( 0 ); - } + if (names.empty() && paths.empty()) + { + do + { + // use as default for gnome environments + if (QFileInfo("/usr/bin/gedit").isExecutable()) + { + AddApplicationType("gedit", "/usr/bin/gedit +(line) (file)"); + break; + } + // use as default for kde environments + if (QFileInfo("/usr/bin/kate").isExecutable()) + { + AddApplicationType("kate", "/usr/bin/kate -l(line) (file)"); + break; + } + // use as default for windows environments + if (QFileInfo("%PROGRAMFILES%\\Notepad++\\notepad++.exe").isExecutable()) + { + AddApplicationType("notepad++", "%PROGRAMFILES%\\Notepad++\\notepad++.exe -n(line) (file)"); + break; + } + } + while (0); + } if (names.size() == paths.size()) {