- enhancement: custome icons for project view
This commit is contained in:
parent
f75901797a
commit
54afa319a7
|
@ -2555,26 +2555,34 @@ void Settings::CompilerSets::findSets()
|
||||||
{
|
{
|
||||||
clearSets();
|
clearSets();
|
||||||
QSet<QString> searched;
|
QSet<QString> searched;
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
addSets(includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW32"+QDir::separator()+"bin");
|
|
||||||
addSets(includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW64"+QDir::separator()+"bin");
|
|
||||||
searched.insert(includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW32"+QDir::separator()+"bin");
|
|
||||||
searched.insert(includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW64"+QDir::separator()+"bin");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||||
QString path = env.value("PATH");
|
QString path = env.value("PATH");
|
||||||
QStringList pathList = path.split(PATH_SEPARATOR);
|
QStringList pathList = path.split(PATH_SEPARATOR);
|
||||||
foreach (const QString& s, pathList){
|
QString folder;
|
||||||
if (searched.contains(s))
|
for (int i=pathList.count()-1;i>=0;i--) {
|
||||||
continue;;
|
folder = pathList[i];
|
||||||
searched.insert(s);
|
if (searched.contains(folder))
|
||||||
if (s!="/bin") { // /bin/gcc is symbolic link to /usr/bin/gcc
|
continue;
|
||||||
addSets(s);
|
searched.insert(folder);
|
||||||
|
if (folder!="/bin") { // /bin/gcc is symbolic link to /usr/bin/gcc
|
||||||
|
addSets(folder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
folder = includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW32"+QDir::separator()+"bin";
|
||||||
|
if (!searched.contains(folder)) {
|
||||||
|
addSets(folder);
|
||||||
|
searched.insert(folder);
|
||||||
|
}
|
||||||
|
folder = includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW64"+QDir::separator()+"bin";
|
||||||
|
if (!searched.contains(folder)) {
|
||||||
|
addSets(folder);
|
||||||
|
searched.insert(folder);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::CompilerSets::saveSets()
|
void Settings::CompilerSets::saveSets()
|
||||||
|
|
Loading…
Reference in New Issue