forked from qt-creator/qt-creator
Docker: Fix crash while removing auto detected toolchains
Change-Id: Id0cf4346b97f54247ad81ae0d93a42935dca8a0f Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -628,9 +628,9 @@ void KitDetectorPrivate::undoAutoDetect() const
|
||||
};
|
||||
|
||||
emit q->logOutput('\n' + tr("Removing toolchain entries..."));
|
||||
for (ToolChain *toolChain : ToolChainManager::toolchains()) {
|
||||
QString detectionSource = toolChain->detectionSource();
|
||||
if (toolChain->detectionSource() == m_sharedId) {
|
||||
const Toolchains toolchains = ToolChainManager::toolchains();
|
||||
for (ToolChain *toolChain : toolchains) {
|
||||
if (toolChain && toolChain->detectionSource() == m_sharedId) {
|
||||
emit q->logOutput(tr("Removed \"%1\"").arg(toolChain->displayName()));
|
||||
ToolChainManager::deregisterToolChain(toolChain);
|
||||
}
|
||||
|
Reference in New Issue
Block a user