forked from qt-creator/qt-creator
PE: Fix compiler for constructing default kit
Amends e94f5b496e
.
Change-Id: I9510c2231750a2ce58bc37c533735d9709eb0ca0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -252,12 +252,21 @@ void KitManager::restoreKits()
|
||||
}
|
||||
const QString bestFilePath = bestTc->compilerCommand().toString();
|
||||
const QString currentFilePath = tc->compilerCommand().toString();
|
||||
if ((currentFilePath.contains("icecc") && !bestFilePath.contains("icecc"))
|
||||
|| (currentFilePath.contains("ccache") && !bestFilePath.contains("ccache")
|
||||
&& !bestFilePath.contains("icecc"))
|
||||
|| (bestFilePath.length() > currentFilePath.length())) {
|
||||
if (bestFilePath.contains("icecc"))
|
||||
continue;
|
||||
if (currentFilePath.contains("icecc")) {
|
||||
bestTc = tc;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bestFilePath.contains("ccache"))
|
||||
continue;
|
||||
if (currentFilePath.contains("ccache")) {
|
||||
bestTc = tc;
|
||||
continue;
|
||||
}
|
||||
if (bestFilePath.length() > currentFilePath.length())
|
||||
bestTc = tc;
|
||||
}
|
||||
|
||||
int maxWeight = 0;
|
||||
|
Reference in New Issue
Block a user