ProjectExplorer: Add "Re-detect" button to toolchains page

This allows to take changed detection settings or added/removed
compilers into account without restarting Qt Creator.
It is also the only way to get rid of formerly auto-detected compilers
that would not get detected anymore with the current settings.

Change-Id: I3d8a7659e24fa5d55d1fb17864386cf19d3e2533
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-04-08 17:36:39 +02:00
parent 6cb2e71c38
commit 3969a007c2
3 changed files with 67 additions and 9 deletions

View File

@@ -195,6 +195,8 @@ QList<ToolChain *> ToolChainSettingsAccessor::restoreToolChains(QWidget *parent)
const QList<ToolChain *> systemFileTcs
= toolChains(restoreSettings(FileName::fromString(Core::ICore::installerResourcePath() + TOOLCHAIN_FILENAME),
parent));
for (ToolChain * const systemTc : systemFileTcs)
systemTc->setDetection(ToolChain::AutoDetectionFromSdk);
// read all tool chains from user file.
const QList<ToolChain *> userFileTcs = toolChains(restoreSettings(parent));