aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/toolchain.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer/toolchain.h')
-rw-r--r--src/plugins/projectexplorer/toolchain.h43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h
index 519239c1f0..e4ca6f9dde 100644
--- a/src/plugins/projectexplorer/toolchain.h
+++ b/src/plugins/projectexplorer/toolchain.h
@@ -33,11 +33,10 @@
#include "task.h"
#include "toolchaincache.h"
-#include <coreplugin/id.h>
-
#include <utils/cpplanguage_details.h>
#include <utils/environment.h>
#include <utils/fileutils.h>
+#include <utils/id.h>
#include <QObject>
#include <QSet>
@@ -47,6 +46,8 @@
#include <functional>
#include <memory>
+namespace Utils { class OutputLineParser; }
+
namespace ProjectExplorer {
namespace Internal { class ToolChainPrivate; }
@@ -64,7 +65,6 @@ QString languageId(Language l);
} // namespace Deprecated
class Abi;
-class IOutputParser;
class ToolChainConfigWidget;
class ToolChainFactory;
class Kit;
@@ -75,7 +75,7 @@ class PROJECTEXPLORER_EXPORT ToolChainDescription
{
public:
Utils::FilePath compilerPath;
- Core::Id language;
+ Utils::Id language;
};
// --------------------------------------------------------------------------
@@ -106,7 +106,7 @@ public:
virtual QStringList suggestedMkspecList() const;
- Core::Id typeId() const;
+ Utils::Id typeId() const;
QString typeDisplayName() const;
virtual Abi targetAbi() const = 0;
@@ -147,10 +147,10 @@ public:
virtual void addToEnvironment(Utils::Environment &env) const = 0;
virtual Utils::FilePath makeCommand(const Utils::Environment &env) const = 0;
- Core::Id language() const;
+ Utils::Id language() const;
virtual Utils::FilePath compilerCommand() const = 0;
- virtual IOutputParser *outputParser() const = 0;
+ virtual QList<Utils::OutputLineParser *> createOutputParsers() const = 0;
virtual bool operator ==(const ToolChain &) const;
@@ -164,14 +164,14 @@ public:
virtual bool isJobCountSupported() const { return true; }
- void setLanguage(Core::Id language);
+ void setLanguage(Utils::Id language);
void setDetection(Detection d);
static Utils::LanguageVersion cxxLanguageVersion(const QByteArray &cplusplusMacroValue);
- static Utils::LanguageVersion languageVersion(const Core::Id &language, const Macros &macros);
+ static Utils::LanguageVersion languageVersion(const Utils::Id &language, const Macros &macros);
protected:
- explicit ToolChain(Core::Id typeId);
+ explicit ToolChain(Utils::Id typeId);
void setTypeDisplayName(const QString &typeName);
@@ -193,18 +193,19 @@ private:
friend class ToolChainFactory;
};
-class PROJECTEXPLORER_EXPORT ToolChainFactory : public QObject
+class PROJECTEXPLORER_EXPORT ToolChainFactory
{
- Q_OBJECT
+ ToolChainFactory(const ToolChainFactory &) = delete;
+ ToolChainFactory &operator=(const ToolChainFactory &) = delete;
public:
ToolChainFactory();
- ~ToolChainFactory() override;
+ virtual ~ToolChainFactory();
static const QList<ToolChainFactory *> allToolChainFactories();
QString displayName() const { return m_displayName; }
- Core::Id supportedToolChainType() const;
+ Utils::Id supportedToolChainType() const;
virtual QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown);
virtual QList<ToolChain *> detectForImport(const ToolChainDescription &tcd);
@@ -215,19 +216,19 @@ public:
ToolChain *restore(const QVariantMap &data);
static QByteArray idFromMap(const QVariantMap &data);
- static Core::Id typeIdFromMap(const QVariantMap &data);
+ static Utils::Id typeIdFromMap(const QVariantMap &data);
static void autoDetectionToMap(QVariantMap &data, bool detected);
- static ToolChain *createToolChain(Core::Id toolChainType);
+ static ToolChain *createToolChain(Utils::Id toolChainType);
- QSet<Core::Id> supportedLanguages() const;
+ QSet<Utils::Id> supportedLanguages() const;
void setUserCreatable(bool userCreatable);
protected:
void setDisplayName(const QString &name) { m_displayName = name; }
- void setSupportedToolChainType(const Core::Id &supportedToolChainType);
- void setSupportedLanguages(const QSet<Core::Id> &supportedLanguages);
+ void setSupportedToolChainType(const Utils::Id &supportedToolChainType);
+ void setSupportedLanguages(const QSet<Utils::Id> &supportedLanguages);
void setSupportsAllLanguages(bool supportsAllLanguages);
void setToolchainConstructor(const std::function<ToolChain *()> &constructor);
@@ -246,8 +247,8 @@ protected:
private:
QString m_displayName;
- Core::Id m_supportedToolChainType;
- QSet<Core::Id> m_supportedLanguages;
+ Utils::Id m_supportedToolChainType;
+ QSet<Utils::Id> m_supportedLanguages;
bool m_supportsAllLanguages = false;
bool m_userCreatable = false;
std::function<ToolChain *()> m_toolchainConstructor;