Commit f3eb79b1 authored by con's avatar con
Browse files

Remove the project parameter to ToolChain::defaultMakeTarget again.

parent a9d05dab
......@@ -88,7 +88,7 @@ public:
virtual void addToEnvironment(ProjectExplorer::Environment &env) = 0;
virtual ToolChainType type() const = 0;
virtual QString makeCommand() const = 0;
virtual QString defaultMakeTarget(const Project *project) const = 0;
virtual QString defaultMakeTarget() const = 0;
ToolChain();
virtual ~ToolChain();
......@@ -118,7 +118,7 @@ public:
virtual void addToEnvironment(ProjectExplorer::Environment &env);
virtual ToolChainType type() const;
virtual QString makeCommand() const;
virtual QString defaultMakeTarget(const Project *) const { return ""; }
virtual QString defaultMakeTarget() const { return ""; }
protected:
virtual bool equals(ToolChain *other) const;
......@@ -152,7 +152,7 @@ public:
virtual void addToEnvironment(ProjectExplorer::Environment &env);
virtual ToolChainType type() const;
virtual QString makeCommand() const;
virtual QString defaultMakeTarget(const Project *) const { return ""; }
virtual QString defaultMakeTarget() const { return ""; }
protected:
virtual bool equals(ToolChain *other) const;
QString m_name;
......
......@@ -121,12 +121,12 @@ QString GCCEToolChain::makeCommand() const
return "make";
}
QString GCCEToolChain::defaultMakeTarget(const Project *project) const
QString GCCEToolChain::defaultMakeTarget() const
{
const Qt4Project *qt4project = qobject_cast<const Qt4Project *>(project);
const Qt4Project *qt4project = qobject_cast<const Qt4Project *>(m_project);
if (qt4project) {
if (!(QtVersion::QmakeBuildConfig(qt4project->qmakeStep()->value(
project->activeBuildConfiguration(),
qt4project->activeBuildConfiguration(),
"buildConfiguration").toInt()) & QtVersion::DebugBuild)) {
return "release-gcce";
}
......@@ -140,3 +140,8 @@ bool GCCEToolChain::equals(ToolChain *other) const
&& m_deviceId == static_cast<GCCEToolChain *>(other)->m_deviceId
&& m_deviceName == static_cast<GCCEToolChain *>(other)->m_deviceName);
}
void GCCEToolChain::setProject(const ProjectExplorer::Project *project)
{
m_project = project;
}
......@@ -18,7 +18,9 @@ public:
void addToEnvironment(ProjectExplorer::Environment &env);
ProjectExplorer::ToolChain::ToolChainType type() const;
QString makeCommand() const;
QString defaultMakeTarget(const ProjectExplorer::Project *project) const;
QString defaultMakeTarget() const;
void setProject(const ProjectExplorer::Project *project);
protected:
bool equals(ToolChain *other) const;
......@@ -29,6 +31,7 @@ private:
QString m_deviceRoot;
QByteArray m_predefinedMacros;
QList<ProjectExplorer::HeaderPath> m_systemHeaderPaths;
const ProjectExplorer::Project *m_project;
};
} // namespace Internal
......
......@@ -8,10 +8,6 @@
* gui for overriding the default make target if necessary,
make arguments --> make options
* more general "debug / release" configuration to be used in toolchain???
* tool chain instance should move to qt4project again, qt version defines
the possible tool chains, and possibly the tool chain creation, but not
the currently used one; we can probably get rid of the project parameter
of ToolChain::defaultMakeTarget then as well
* build parser should be defined/created by toolchain, not make step
* Debugging helpers
......
......@@ -70,7 +70,7 @@ QString WINSCWToolChain::makeCommand() const
return "make";
}
QString WINSCWToolChain::defaultMakeTarget(const Project *) const
QString WINSCWToolChain::defaultMakeTarget() const
{
return "debug-winscw";
}
......
......@@ -18,7 +18,7 @@ public:
void addToEnvironment(ProjectExplorer::Environment &env);
ProjectExplorer::ToolChain::ToolChainType type() const;
QString makeCommand() const;
QString defaultMakeTarget(const ProjectExplorer::Project *) const;
QString defaultMakeTarget() const;
protected:
bool equals(ToolChain *other) const;
......
......@@ -43,6 +43,10 @@
#include "projectloadwizard.h"
#include "qtversionmanager.h"
#ifdef QTCREATOR_WITH_S60
#include "qt-s60/gccetoolchain.h"
#endif
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/coreconstants.h>
......@@ -385,6 +389,11 @@ ProjectExplorer::ToolChain *Qt4Project::toolChain(const QString &buildConfigurat
{
if (!m_toolChain) {
m_toolChain = qtVersion(buildConfiguration)->createToolChain(toolChainType(buildConfiguration));
#ifdef QTCREATOR_WITH_S60
if (m_toolChain->type() == ToolChain::GCCE) {
static_cast<GCCEToolChain *>(m_toolChain)->setProject(this);
}
#endif
}
return m_toolChain;
}
......@@ -396,7 +405,7 @@ QString Qt4Project::makeCommand(const QString &buildConfiguration) const
QString Qt4Project::defaultMakeTarget(const QString &buildConfiguration) const
{
return toolChain(buildConfiguration)->defaultMakeTarget(this);
return toolChain(buildConfiguration)->defaultMakeTarget();
}
void Qt4Project::updateCodeModel()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment