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 bestFilePath = bestTc->compilerCommand().toString();
const QString currentFilePath = tc->compilerCommand().toString(); const QString currentFilePath = tc->compilerCommand().toString();
if ((currentFilePath.contains("icecc") && !bestFilePath.contains("icecc")) if (bestFilePath.contains("icecc"))
|| (currentFilePath.contains("ccache") && !bestFilePath.contains("ccache") continue;
&& !bestFilePath.contains("icecc")) if (currentFilePath.contains("icecc")) {
|| (bestFilePath.length() > currentFilePath.length())) {
bestTc = tc; 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; int maxWeight = 0;