astyle formatting

This commit is contained in:
Daniel Marjamäki 2010-08-15 08:11:32 +02:00
parent 556ef9afcf
commit 676e0d2c70
1 changed files with 25 additions and 23 deletions

View File

@ -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())
{