diff options
author | Eike Ziller <eike.ziller@qt.io> | 2017-04-20 14:51:49 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2017-04-21 13:28:54 +0000 |
commit | 1891af4b07801e6cbab95aca77b2ef4979b46cc0 (patch) | |
tree | 5eaf1a82153a847e069d139f8903ae4dd14d7b49 /src/app | |
parent | 0dfd08b00e4f4ee9300fffcb56aca546df26eb03 (diff) |
Specify Qt Creator's "display version" in qtcreator.pri/qtc.qbs
Currently it is set by passing defines to qmake, which complicates
package build setups.
Set the display version where the numerical version is defined. This
also makes it available to developer builds. Also switch around the
display version and numerical version in the about dialog, since e.g.
"4.3.0-rc1" is more descriptive than "4.2.83".
Change-Id: I26dda427975acdc6cc169f8d625f57918167cf19
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/app_version.h.in | 10 | ||||
-rw-r--r-- | src/app/app_version_header.qbs | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/app/app_version.h.in b/src/app/app_version.h.in index 0e622901e13..19bff44d49a 100644 --- a/src/app/app_version.h.in +++ b/src/app/app_version.h.in @@ -33,21 +33,17 @@ namespace Constants { #define IDE_VERSION $${QTCREATOR_VERSION} #define IDE_VERSION_STR STRINGIFY(IDE_VERSION) +#define IDE_VERSION_DISPLAY_DEF $${QTCREATOR_DISPLAY_VERSION} #define IDE_VERSION_MAJOR $$replace(QTCREATOR_VERSION, "^(\\d+)\\.\\d+\\.\\d+(-.*)?$", \\1) #define IDE_VERSION_MINOR $$replace(QTCREATOR_VERSION, "^\\d+\\.(\\d+)\\.\\d+(-.*)?$", \\1) #define IDE_VERSION_RELEASE $$replace(QTCREATOR_VERSION, "^\\d+\\.\\d+\\.(\\d+)(-.*)?$", \\1) const char * const IDE_VERSION_LONG = IDE_VERSION_STR; +const char * const IDE_VERSION_DISPLAY = STRINGIFY(IDE_VERSION_DISPLAY_DEF); const char * const IDE_AUTHOR = \"The Qt Company Ltd\"; const char * const IDE_YEAR = \"2017\"; -#ifdef IDE_VERSION_DESCRIPTION -const char * const IDE_VERSION_DESCRIPTION_STR = STRINGIFY(IDE_VERSION_DESCRIPTION); -#else -const char * const IDE_VERSION_DESCRIPTION_STR = \"\"; -#endif - #ifdef IDE_REVISION const char * const IDE_REVISION_STR = STRINGIFY(IDE_REVISION); #else @@ -67,7 +63,7 @@ const char * const IDE_COPY_SETTINGS_FROM_VARIANT_STR = STRINGIFY(IDE_COPY_SETTI const char * const IDE_COPY_SETTINGS_FROM_VARIANT_STR = \"Nokia\"; #endif - +#undef IDE_VERSION_DISPLAY_DEF #undef IDE_VERSION #undef IDE_VERSION_STR #undef STRINGIFY diff --git a/src/app/app_version_header.qbs b/src/app/app_version_header.qbs index 6a6b2540c19..5730be75429 100644 --- a/src/app/app_version_header.qbs +++ b/src/app/app_version_header.qbs @@ -32,6 +32,8 @@ Product { if (onWindows) content = content.replace(/\r\n/g, "\n"); // replace the magic qmake incantations + content = content.replace(/(\n#define IDE_VERSION_DISPLAY_DEF) .+\n/, "$1 " + + product.moduleProperty("qtc", "qtcreator_display_version") + "\n"); content = content.replace(/(\n#define IDE_VERSION) .+\n/, "$1 " + product.moduleProperty("qtc", "qtcreator_version") + "\n"); content = content.replace(/(\n#define IDE_VERSION_MAJOR) .+\n/, "$1 " |