forked from qt-creator/qt-creator
ProjectExplorer: Stop caching useless macro inspection report
If there is a manually added compiler in "Menu: Tools > Options > Kits > Compilers" and either (1) "Apply" is clicked after Qt Creator start (2) or an invalid compiler path is inserted and "Apply" is clicked we don't have any macros. Thus, avoid populating the macro cache for this case. This avoids triggering SOFT ASSERT: "false && "__cplusplus is not predefined, assuming latest C++ we support."" in file toolchain.cpp, line 324 Change-Id: I23d20a24385824f4fa2ca6f39a8a04dc0eb0c308 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -1083,6 +1083,10 @@ void GccToolChainConfigWidget::applyImpl()
|
||||
tc->setDisplayName(displayName); // reset display name
|
||||
tc->setPlatformCodeGenFlags(splitString(m_platformCodeGenFlagsLineEdit->text()));
|
||||
tc->setPlatformLinkerFlags(splitString(m_platformLinkerFlagsLineEdit->text()));
|
||||
|
||||
if (m_macros.isEmpty())
|
||||
return;
|
||||
|
||||
tc->m_predefinedMacrosCache
|
||||
->insert(tc->platformCodeGenFlags(),
|
||||
ToolChain::MacroInspectionReport{m_macros,
|
||||
|
Reference in New Issue
Block a user