ToolChain: Refactor toolchain support

Refactor ToolChains in Qt Creator:

 * Allow for several toolchains of the same type
 * Be smarter wrt. guessing what kind of output a toolchain
   produces. This allows us to eventually handle e.g. embedded
   linux setups way better than before.
 * Be smarter wrt. guessing what kind of environment a Qt version
   needs.
 * Improve auto-detection of toolchains a bit
 * Decide on which debugger to use based on the kind of output
   produced by the compiler.
 * Add options page to configure toolchains
 * Remove toolchain related options from the Qt version dialog

Reviewed-by: dt
This commit is contained in:
Tobias Hunger
2011-02-01 18:36:00 +01:00
parent be31c80b02
commit 8d0c477245
112 changed files with 6498 additions and 3687 deletions

View File

@@ -41,13 +41,17 @@
#include <projectexplorer/project.h>
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/toolchaintype.h>
#include <projectexplorer/buildconfiguration.h>
#include <coreplugin/ifile.h>
#include <QtCore/QFuture>
QT_BEGIN_NAMESPACE
class QComboBox;
QT_END_NAMESPACE
namespace Utils {
class PathChooser;
}
@@ -90,7 +94,6 @@ public:
QStringList files(FilesMode fileMode) const;
QStringList buildTargets() const;
ProjectExplorer::ToolChain *toolChain() const;
bool addFiles(const QStringList &filePaths);
bool removeFiles(const QStringList &filePaths);
@@ -111,11 +114,14 @@ public:
QStringList projectIncludePaths() const;
QStringList files() const;
QStringList generated() const;
ProjectExplorer::ToolChainType toolChainType() const;
void setToolChainType(ProjectExplorer::ToolChainType type);
ProjectExplorer::ToolChain *toolChain() const;
void setToolChain(ProjectExplorer::ToolChain *tc);
QVariantMap toMap() const;
signals:
void toolChainChanged(ProjectExplorer::ToolChain *);
protected:
virtual bool fromMap(const QVariantMap &map);
@@ -143,7 +149,6 @@ private:
GenericProjectNode *m_rootNode;
ProjectExplorer::ToolChain *m_toolChain;
ProjectExplorer::ToolChainType m_toolChainType;
QFuture<void> m_codeModelFuture;
};
@@ -190,10 +195,13 @@ public:
private Q_SLOTS:
void buildDirectoryChanged();
void toolChainSelected(int index);
void toolChainChanged(ProjectExplorer::ToolChain *);
void updateToolChainList();
private:
GenericTarget *m_target;
Utils::PathChooser *m_pathChooser;
QComboBox *m_toolChainChooser;
GenericBuildConfiguration *m_buildConfiguration;
};