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:
Christian Stenger
2019-03-20 12:45:53 +01:00
parent b3baed58c6
commit 15f6ba38b6

View File

@@ -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;