diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2014-08-27 11:14:29 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2014-09-04 12:51:58 +0200 |
commit | d56f217f83ff6d808a865a9b524cdfca0f7cc78b (patch) | |
tree | 5f8dcb5e61c77997a66adb30d186cf8670542f23 /src/plugins/qtsupport/baseqtversion.h | |
parent | aa52cd83a63e0ecd659bf0ce4eefbdce4d0b6d48 (diff) | |
download | qt-creator-d56f217f83ff6d808a865a9b524cdfca0f7cc78b.tar.gz |
QtVersion: Allow for variables in Qt version names
* Supported variables are %{Qt:version}, %{Qt:type} and %{Qt:mkspec}
* Qt version display names need no longer be unique. This simplifies
the code a bit and makes the Qt versions behave like the Kits do now.
* The default Qt version name now contains %{Qt:version}. The method
to find the default version name no longer takes a Qt version string.
Change-Id: Ibca1e3daffe5a81f3c158e8bbc1779d033b03872
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Diffstat (limited to 'src/plugins/qtsupport/baseqtversion.h')
-rw-r--r-- | src/plugins/qtsupport/baseqtversion.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h index ec91d6ea58..f7448770c8 100644 --- a/src/plugins/qtsupport/baseqtversion.h +++ b/src/plugins/qtsupport/baseqtversion.h @@ -39,7 +39,10 @@ #include <QStringList> #include <QVariantMap> -namespace Utils { class Environment; } +namespace Utils { +class Environment; +class AbstractMacroExpander; +} // namespace Utils namespace Core { class FeatureSet; } @@ -96,7 +99,8 @@ public: QString autodetectionSource() const; QString displayName() const; - void setDisplayName(const QString &name); + QString unexpandedDisplayName() const; + void setUnexpandedDisplayName(const QString &name); // All valid Ids are >= 0 int uniqueId() const; @@ -194,8 +198,7 @@ public: virtual QtConfigWidget *createConfigurationWidget() const; - static QString defaultDisplayName(const QString &versionString, - const Utils::FileName &qmakePath, + static QString defaultUnexpandedDisplayName(const Utils::FileName &qmakePath, bool fromPath = false); virtual Core::FeatureSet availableFeatures() const; @@ -222,6 +225,8 @@ public: QStringList configValues() const; QStringList qtConfigValues() const; + Utils::AbstractMacroExpander *macroExpander() const; // owned by the Qt version + protected: BaseQtVersion(); BaseQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString()); @@ -238,6 +243,11 @@ protected: void ensureMkSpecParsed() const; virtual void parseMkSpec(ProFileEvaluator *) const; + + // Create the macro expander. This pointer will be cached by the Qt version (which will take + // ownership). + virtual Utils::AbstractMacroExpander *createMacroExpander() const; + private: void setAutoDetectionSource(const QString &autodetectionSource); static int getUniqueId(); @@ -270,7 +280,7 @@ private: mutable QStringList m_configValues; mutable QStringList m_qtConfigValues; - QString m_displayName; + QString m_unexpandedDisplayName; QString m_autodetectionSource; mutable Utils::FileName m_sourcePath; @@ -290,6 +300,8 @@ private: mutable QString m_qmlviewerCommand; mutable QList<ProjectExplorer::Abi> m_qtAbis; + + mutable Utils::AbstractMacroExpander *m_expander; }; } |