From 08bdace731aeeb34b50f5988223ed5c23a8cbb56 Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Thu, 21 Jan 2021 10:09:51 +0200 Subject: Set "FrameworkVersion" in a place consistent with other variables Also document the predefined variable. Change-Id: I733bd4dfd245d300994e85c9ebb4b34a7c51de45 Reviewed-by: Iikka Eklund Reviewed-by: Katja Marttila --- doc/scripting.qdoc | 3 +++ src/libs/installer/packagemanagercoredata.cpp | 2 ++ 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 @@ -256,6 +256,9 @@ \li Current platform: \c "x11", \c "win", or \c "mac". 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. 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 #include -#define QUOTE_(x) #x -#define QUOTE(x) QUOTE_(x) - template 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. -- cgit v1.2.3