forked from qt-creator/qt-creator
ProjectExplorer: Implement RunConfiguration::do{Clone,Restore} in base
It's possible now. Change-Id: I49ed73312aea1627a9543890431e2e379e3fb3ec Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -77,7 +77,7 @@ signals:
|
||||
void scriptSourceChanged();
|
||||
|
||||
private:
|
||||
void initialize(Core::Id id);
|
||||
void initialize(Core::Id id) override;
|
||||
bool fromMap(const QVariantMap &map) override;
|
||||
|
||||
void changeCurrentFile(Core::IEditor* = 0);
|
||||
|
||||
@@ -103,22 +103,11 @@ bool QmlProjectRunConfigurationFactory::canCreate(ProjectExplorer::Target *paren
|
||||
return false;
|
||||
}
|
||||
|
||||
ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::doCreate(ProjectExplorer::Target *parent, Core::Id id)
|
||||
{
|
||||
return createHelper<QmlProjectRunConfiguration>(parent, id);
|
||||
}
|
||||
|
||||
bool QmlProjectRunConfigurationFactory::canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const
|
||||
{
|
||||
return parent && canCreate(parent, ProjectExplorer::idFromMap(map));
|
||||
}
|
||||
|
||||
ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::doRestore(ProjectExplorer::Target *parent,
|
||||
const QVariantMap &map)
|
||||
{
|
||||
return createHelper<QmlProjectRunConfiguration>(parent, ProjectExplorer::idFromMap(map));
|
||||
}
|
||||
|
||||
bool QmlProjectRunConfigurationFactory::canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source) const
|
||||
{
|
||||
return canCreate(parent, source->id());
|
||||
|
||||
@@ -46,10 +46,6 @@ public:
|
||||
|
||||
private:
|
||||
bool canHandle(ProjectExplorer::Target *parent) const;
|
||||
|
||||
ProjectExplorer::RunConfiguration *doCreate(ProjectExplorer::Target *parent, Core::Id id) override;
|
||||
ProjectExplorer::RunConfiguration *doRestore(ProjectExplorer::Target *parent,
|
||||
const QVariantMap &map) override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user