forked from qt-creator/qt-creator
ProjectExplorer: ToolchainManager code cosmetics
Unused declaration, foreach, ... Change-Id: Iaf781e6e6f51f399ec40b6435051e19f85d11888 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -38,11 +38,8 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QSettings>
|
||||
|
||||
#include <tuple>
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
namespace ProjectExplorer {
|
||||
@@ -65,7 +62,7 @@ public:
|
||||
|
||||
std::unique_ptr<ToolChainSettingsAccessor> m_accessor;
|
||||
|
||||
QList<ToolChain *> m_toolChains; // prioritized List
|
||||
Toolchains m_toolChains; // prioritized List
|
||||
QVector<LanguageDisplayPair> m_languages;
|
||||
ToolchainDetectionSettings m_detectionSettings;
|
||||
bool m_loaded = false;
|
||||
@@ -144,7 +141,7 @@ void ToolChainManager::saveToolChains()
|
||||
ToolchainDetectionSettings().detectX64AsX32);
|
||||
}
|
||||
|
||||
QList<ToolChain *> ToolChainManager::toolChains(const ToolChain::Predicate &predicate)
|
||||
Toolchains ToolChainManager::toolChains(const ToolChain::Predicate &predicate)
|
||||
{
|
||||
if (predicate)
|
||||
return Utils::filtered(d->m_toolChains, predicate);
|
||||
@@ -156,10 +153,10 @@ ToolChain *ToolChainManager::toolChain(const ToolChain::Predicate &predicate)
|
||||
return Utils::findOrDefault(d->m_toolChains, predicate);
|
||||
}
|
||||
|
||||
QList<ToolChain *> ToolChainManager::findToolChains(const Abi &abi)
|
||||
Toolchains ToolChainManager::findToolChains(const Abi &abi)
|
||||
{
|
||||
QList<ToolChain *> result;
|
||||
foreach (ToolChain *tc, d->m_toolChains) {
|
||||
Toolchains result;
|
||||
for (ToolChain *tc : qAsConst(d->m_toolChains)) {
|
||||
bool isCompatible = Utils::anyOf(tc->supportedAbis(), [abi](const Abi &supportedAbi) {
|
||||
return supportedAbi.isCompatibleWith(abi);
|
||||
});
|
||||
|
@@ -97,12 +97,9 @@ signals:
|
||||
private:
|
||||
explicit ToolChainManager(QObject *parent = nullptr);
|
||||
|
||||
// Make sure the this is only called after all
|
||||
// Tool chain Factories are registered!
|
||||
// Make sure the this is only called after all toolchain factories are registered!
|
||||
static void restoreToolChains();
|
||||
|
||||
static QList<ToolChain *> readSystemFileToolChains();
|
||||
|
||||
static void notifyAboutUpdate(ToolChain *);
|
||||
|
||||
friend class ProjectExplorerPlugin; // for constructor
|
||||
|
Reference in New Issue
Block a user