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

@@ -431,14 +431,10 @@ void Qt4Project::updateCppCodeModel()
ToolChain *tc = activeBC->toolChain();
if (tc) {
predefinedMacros = tc->predefinedMacros();
//qDebug()<<"Predefined Macros";
//qDebug()<<tc->predefinedMacros();
//qDebug()<<"";
//qDebug()<<"System Header Paths";
//foreach(const HeaderPath &hp, tc->systemHeaderPaths())
// qDebug()<<hp.path();
foreach (const HeaderPath &headerPath, tc->systemHeaderPaths()) {
QList<HeaderPath> headers = tc->systemHeaderPaths();
headers.append(activeBC->qtVersion()->systemHeaderPathes());
foreach (const HeaderPath &headerPath, headers) {
if (headerPath.kind() == HeaderPath::FrameworkHeaderPath)
predefinedFrameworkPaths.append(headerPath.path());
else
@@ -920,8 +916,11 @@ ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4ProFileNode)
QtVersion *version = activeTarget()->activeBuildConfiguration()->qtVersion();
if (version->isValid()) {
m_proFileOption->properties = version->versionInfo();
m_proFileOption->sysroot
= activeTarget()->activeBuildConfiguration()->toolChain()->sysroot();
if (activeTarget()
&& activeTarget()->activeBuildConfiguration()
&& activeTarget()->activeBuildConfiguration()->toolChain())
m_proFileOption->sysroot
= activeTarget()->activeBuildConfiguration()->qtVersion()->systemRoot();
}
}