forked from qt-creator/qt-creator
C++: fix cplusplus tools build with Qt 5.14
It's using QMapIterator that is disabled by default with QT_NO_JAVA_STYLE_ITERATORS defined in cmake\QtCreatorAPIInternal.cmake. Change to not use QMapIterator. Another way would be to undefine QT_NO_JAVA_STYLE_ITERATORS before including QMap, but that would not work with precompiled headers enabled Change-Id: I26dcba64dc84b6c154f62ddd9520075b59f618b2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -82,14 +82,12 @@ SystemPreprocessor::SystemPreprocessor(bool verbose)
|
||||
m_knownCompilers[Utils::HostOsInfo::withExecutableSuffix("cl")]
|
||||
= QLatin1String("/DCPLUSPLUS_WITHOUT_QT /U__BLOCKS__ /TP /E /I . /FI");
|
||||
|
||||
QMapIterator<QString, QString> i(m_knownCompilers);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
for (const QString &key:m_knownCompilers.keys()) {
|
||||
const Utils::FilePath executablePath
|
||||
= Utils::Environment::systemEnvironment().searchInPath(i.key());
|
||||
= Utils::Environment::systemEnvironment().searchInPath(key);
|
||||
if (!executablePath.isEmpty()) {
|
||||
m_compiler = i.key();
|
||||
m_compilerArguments = i.value().split(QLatin1Char(' '), QString::SkipEmptyParts);
|
||||
m_compiler = key;
|
||||
m_compilerArguments = m_knownCompilers[key].split(QLatin1Char(' '), QString::SkipEmptyParts);
|
||||
m_compilerArguments
|
||||
<< QDir::toNativeSeparators(QLatin1String(PATH_PREPROCESSOR_CONFIG));
|
||||
break;
|
||||
|
Reference in New Issue
Block a user