summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager/qmakestep.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2010-01-14 17:41:29 +0100
committerTobias Hunger <tobias.hunger@nokia.com>2010-02-01 12:23:12 +0100
commit1726688434b4f974d0179d4ec979ce00f208c9b2 (patch)
tree502f06910adc0744a1fb13b4f8f1d0d01731b844 /src/plugins/qt4projectmanager/qmakestep.h
parentc410d268dbe05c26563f4beceab99e2420f7a521 (diff)
downloadqt-creator-1726688434b4f974d0179d4ec979ce00f208c9b2.tar.gz
Make use of ProjectConfiguration class in BuildSteps
* Use new BuildSteps interface (as seen in ProjectConfiguration). * Use new factory to construct/clone/restore them. Reviewed-by: dt
Diffstat (limited to 'src/plugins/qt4projectmanager/qmakestep.h')
-rw-r--r--src/plugins/qt4projectmanager/qmakestep.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/plugins/qt4projectmanager/qmakestep.h b/src/plugins/qt4projectmanager/qmakestep.h
index 53fa52d2e8..009f9be0b1 100644
--- a/src/plugins/qt4projectmanager/qmakestep.h
+++ b/src/plugins/qt4projectmanager/qmakestep.h
@@ -51,13 +51,17 @@ class Qt4BuildConfiguration;
class QMakeStepFactory : public ProjectExplorer::IBuildStepFactory
{
Q_OBJECT
+
public:
- QMakeStepFactory();
+ explicit QMakeStepFactory(QObject *parent = 0);
virtual ~QMakeStepFactory();
- bool canCreate(const QString & id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildConfiguration *bc, const QString &id) const;
- ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStep *bs, ProjectExplorer::BuildConfiguration *bc) const;
- QStringList canCreateForBuildConfiguration(ProjectExplorer::BuildConfiguration *bc) const;
+ bool canCreate(ProjectExplorer::BuildConfiguration *parent, const QString & id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildConfiguration *parent, const QString &id);
+ bool canClone(ProjectExplorer::BuildConfiguration *parent, ProjectExplorer::BuildStep *bs) const;
+ ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildConfiguration *parent, ProjectExplorer::BuildStep *bs);
+ bool canRestore(ProjectExplorer::BuildConfiguration *parent, const QVariantMap &map) const;
+ ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildConfiguration *parent, const QVariantMap &map);
+ QStringList availableCreationIds(ProjectExplorer::BuildConfiguration *bc) const;
QString displayNameForId(const QString &id) const;
};
@@ -67,15 +71,15 @@ public:
class QMakeStep : public ProjectExplorer::AbstractProcessStep
{
Q_OBJECT
+ friend class Internal::QMakeStepFactory;
+
public:
- QMakeStep(ProjectExplorer::BuildConfiguration *bc);
- QMakeStep(QMakeStep *bs, ProjectExplorer::BuildConfiguration *bc);
- ~QMakeStep();
+ explicit QMakeStep(Internal::Qt4BuildConfiguration *parent);
+ virtual ~QMakeStep();
+
Internal::Qt4BuildConfiguration *qt4BuildConfiguration() const;
virtual bool init();
virtual void run(QFutureInterface<bool> &);
- virtual QString id();
- virtual QString displayName();
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
virtual bool immutable() const;
void setForced(bool b);
@@ -85,17 +89,22 @@ public:
QStringList userArguments();
void setUserArguments(const QStringList &arguments);
- virtual void restoreFromLocalMap(const QMap<QString, QVariant> &map);
- virtual void storeIntoLocalMap(QMap<QString, QVariant> &map);
+ QVariantMap toMap() const;
signals:
void userArgumentsChanged();
protected:
+ QMakeStep(Internal::Qt4BuildConfiguration *parent, QMakeStep *source);
+ QMakeStep(Internal::Qt4BuildConfiguration *parent, const QString &id);
+ virtual bool fromMap(const QVariantMap &map);
+
virtual void processStartupFailed();
virtual bool processFinished(int exitCode, QProcess::ExitStatus status);
private:
+ void ctor();
+
// last values
QStringList m_lastEnv;
bool m_forced;