diff options
author | hjk <hjk@qt.io> | 2017-09-01 13:23:02 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2017-09-13 09:24:26 +0000 |
commit | 890c1906e6fb2eceb3eaf381b0c298138be3a932 (patch) | |
tree | b8497216ea125ac47621451082202a25000206e7 /src/plugins/winrt/winrtrunconfiguration.h | |
parent | 4710e6b4b2df67a9d483c33e1a2b06a4139f7baa (diff) | |
download | qt-creator-890c1906e6fb2eceb3eaf381b0c298138be3a932.tar.gz |
ProjectExplorer: Re-organize RunConfiguration constructors
The idea is to massage the setup in a way to make implementation
of new configurations less error prone by identifying recurring patterns
and sharing repetitive code that tends to be forgotten (see Android cloning).
The former two lines of constructors (owner-and-id, owner-and-source)
are split into a simple, shared, constructor and new setId() and
copyFrom() functions.
The change is mostly mechanical, some multiple calls to fromMap
have been removed, though, some consts added.
Otherwise, to keep the patch small it temporarily introduces two
helper templates in IRunConfigurationFactory. Also, setId() signatures
have not been unified yet. These won't be needed in the final setup.
Change-Id: I8c0734496caae744a9883fe6d92c1d8f8e0234ea
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/winrt/winrtrunconfiguration.h')
-rw-r--r-- | src/plugins/winrt/winrtrunconfiguration.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/winrt/winrtrunconfiguration.h b/src/plugins/winrt/winrtrunconfiguration.h index 36412f331d..9e3c13878c 100644 --- a/src/plugins/winrt/winrtrunconfiguration.h +++ b/src/plugins/winrt/winrtrunconfiguration.h @@ -35,7 +35,7 @@ class WinRtRunConfiguration : public ProjectExplorer::RunConfiguration Q_OBJECT public: - explicit WinRtRunConfiguration(ProjectExplorer::Target *parent, Core::Id id); + explicit WinRtRunConfiguration(ProjectExplorer::Target *target); QWidget *createConfigurationWidget() override; QVariantMap toMap() const override; @@ -53,8 +53,11 @@ signals: void uninstallAfterStopChanged(bool); private: + friend class ProjectExplorer::IRunConfigurationFactory; + void initialize(Core::Id id); + QString m_proFilePath; - bool m_uninstallAfterStop; + bool m_uninstallAfterStop = false; }; } // namespace Internal |