forked from qt-creator/qt-creator
ProjectExplorer: Let toolchains be (de)registered in bulk
When some code adds or removes a bunch of toolchains at once, that should be made explicit and also be reflected by the respective signal emissions. Fix some leaks and typos along the way. Change-Id: I4a1f12a2378316c5faf70e85a88adc467f076caf Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -343,7 +343,7 @@ private:
|
||||
void onKitsLoaded() override;
|
||||
|
||||
void toolChainUpdated(Toolchain *tc);
|
||||
void toolChainRemoved(Toolchain *tc);
|
||||
void toolChainsDeregistered();
|
||||
};
|
||||
|
||||
ToolchainKitAspectFactory::ToolchainKitAspectFactory()
|
||||
@@ -695,8 +695,8 @@ void ToolchainKitAspectFactory::onKitsLoaded()
|
||||
for (Kit *k : KitManager::kits())
|
||||
fix(k);
|
||||
|
||||
connect(ToolchainManager::instance(), &ToolchainManager::toolchainRemoved,
|
||||
this, &ToolchainKitAspectFactory::toolChainRemoved);
|
||||
connect(ToolchainManager::instance(), &ToolchainManager::toolchainsDeregistered,
|
||||
this, &ToolchainKitAspectFactory::toolChainsDeregistered);
|
||||
connect(ToolchainManager::instance(), &ToolchainManager::toolchainUpdated,
|
||||
this, &ToolchainKitAspectFactory::toolChainUpdated);
|
||||
}
|
||||
@@ -709,9 +709,8 @@ void ToolchainKitAspectFactory::toolChainUpdated(Toolchain *tc)
|
||||
}
|
||||
}
|
||||
|
||||
void ToolchainKitAspectFactory::toolChainRemoved(Toolchain *tc)
|
||||
void ToolchainKitAspectFactory::toolChainsDeregistered()
|
||||
{
|
||||
Q_UNUSED(tc)
|
||||
for (Kit *k : KitManager::kits())
|
||||
fix(k);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user