diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-01-21 10:09:51 +0200 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-01-21 11:07:45 +0200 |
commit | 08bdace731aeeb34b50f5988223ed5c23a8cbb56 (patch) | |
tree | 081941ae38601a4be12e9999acd7b322b908ba96 | |
parent | bf7e1bea802321590112c83f65772a87de34f878 (diff) |
Set "FrameworkVersion" in a place consistent with other variables
Also document the predefined variable.
Change-Id: I733bd4dfd245d300994e85c9ebb4b34a7c51de45
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
-rw-r--r-- | doc/scripting.qdoc | 3 | ||||
-rw-r--r-- | src/libs/installer/packagemanagercoredata.cpp | 2 | ||||
-rw-r--r-- | src/sdk/sdkapp.h | 5 |
3 files changed, 5 insertions, 5 deletions
diff --git a/doc/scripting.qdoc b/doc/scripting.qdoc index ea29e9956..619d8b67a 100644 --- a/doc/scripting.qdoc +++ b/doc/scripting.qdoc @@ -257,6 +257,9 @@ This variable is deprecated: Use \l systemInfo instead. \row + \li FrameworkVersion + \li Version number of the Qt Installer Framework used to build the installation program. + \row \li RootDir \li Root directory of the filesystem. \row diff --git a/src/libs/installer/packagemanagercoredata.cpp b/src/libs/installer/packagemanagercoredata.cpp index 149911d61..d488731df 100644 --- a/src/libs/installer/packagemanagercoredata.cpp +++ b/src/libs/installer/packagemanagercoredata.cpp @@ -182,6 +182,8 @@ void PackageManagerCoreData::setDynamicPredefinedVariables() #endif #define QUOTE_(x) #x #define QUOTE(x) QUOTE_(x) + m_variables.insert(QLatin1String("FrameworkVersion"), QLatin1String(QUOTE(IFW_VERSION_STR))); + // Undocumented, left for compatibility with scripts using the old key m_variables.insert(QLatin1String("IFW_VERSION_STR"), QLatin1String(QUOTE(IFW_VERSION_STR))); #undef QUOTE #undef QUOTE_ diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h index 295456e3b..79c112642 100644 --- a/src/sdk/sdkapp.h +++ b/src/sdk/sdkapp.h @@ -57,9 +57,6 @@ #include <QMessageBox> #include <QMetaEnum> -#define QUOTE_(x) #x -#define QUOTE(x) QUOTE_(x) - template<class T> class SDKApp : public T { @@ -194,8 +191,6 @@ public: QUuid::createUuid().toString(), QUuid::createUuid().toString(), QInstaller::Protocol::Mode::Production, userArgs, isCommandLineInterface); } - // Set this for convenience usage with the installer JS object - m_core->setValue(QLatin1String("FrameworkVersion"), QLatin1String(QUOTE(IFW_VERSION_STR))); // From Qt5.8 onwards system proxy is used by default. If Qt is built with // QT_USE_SYSTEM_PROXIES false then system proxies are not used by default. |