forked from qt-creator/qt-creator
Core: Fix non-CMake compilation with IDE_REVISION
amends ae9fbd04dd
Change-Id: I746a89b21ee07aecad525b7b91fe1f360ad1e853
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -13,5 +13,5 @@ set(IDE_ID "qtcreator") # The IDE id (no spaces, l
|
||||
set(IDE_CASED_ID "QtCreator") # The cased IDE id (no spaces!)
|
||||
set(IDE_BUNDLE_IDENTIFIER "org.qt-project.${IDE_ID}") # The macOS application bundle identifier.
|
||||
|
||||
set(IDE_REVISION_URL "https://code.qt.io/cgit/qt-creator/qt-creator.git/commit/?id=%1")
|
||||
set(IDE_REVISION_URL_STR "https://code.qt.io/cgit/qt-creator/qt-creator.git/commit/?id=%1")
|
||||
# The revision url in the version dialog
|
||||
|
@@ -44,7 +44,7 @@ const char IDE_CASED_ID[] = "${IDE_CASED_ID}";
|
||||
|
||||
const char IDE_VERSION_DISPLAY[] = "${IDE_VERSION_DISPLAY}";
|
||||
const char IDE_REVISION_STR[] = "${IDE_REVISION_STR}";
|
||||
const char IDE_REVISION_URL[] = "${IDE_REVISION_URL}";
|
||||
const char IDE_REVISION_URL_STR[] = "${IDE_REVISION_URL_STR}";
|
||||
|
||||
// changes the path where the settings are saved to
|
||||
const char IDE_SETTINGSVARIANT_STR[] = "${IDE_SETTINGSVARIANT}";
|
||||
|
@@ -54,6 +54,12 @@ const char IDE_REVISION_STR[] = STRINGIFY(IDE_REVISION);
|
||||
const char IDE_REVISION_STR[] = \"\";
|
||||
#endif
|
||||
|
||||
#ifdef IDE_REVISION_URL
|
||||
const char IDE_REVISION_URL_STR[] = STRINGIFY(IDE_REVISION_URL);
|
||||
#else
|
||||
const char IDE_REVISION_URL_STR[] = \"\";
|
||||
#endif
|
||||
|
||||
// changes the path where the settings are saved to
|
||||
#ifdef IDE_SETTINGSVARIANT
|
||||
const char IDE_SETTINGSVARIANT_STR[] = STRINGIFY(IDE_SETTINGSVARIANT);
|
||||
|
@@ -59,12 +59,12 @@ VersionDialog::VersionDialog(QWidget *parent)
|
||||
QString ideRev;
|
||||
#ifdef IDE_REVISION
|
||||
//: This gets conditionally inserted as argument %8 into the description string.
|
||||
const QString revUrl = QString::fromLatin1(Constants::IDE_REVISION_URL);
|
||||
const QString revStr = QString::fromLatin1(Constants::IDE_REVISION_STR);
|
||||
const QString revUrl = QString::fromLatin1(Constants::IDE_REVISION_URL_STR);
|
||||
const QString rev = QString::fromLatin1(Constants::IDE_REVISION_STR);
|
||||
ideRev = tr("<br/>From revision %1<br/>")
|
||||
.arg(revUrl.isEmpty() ? revStr.left(10)
|
||||
.arg(revUrl.isEmpty() ? rev.left(10)
|
||||
: QString::fromLatin1("<a href=\"%1\">%2</a>")
|
||||
.arg(revUrl.arg(revStr), revStr.left(10)));
|
||||
.arg(revUrl.arg(rev), rev.left(10)));
|
||||
#endif
|
||||
QString buildDateInfo;
|
||||
#ifdef QTC_SHOW_BUILD_DATE
|
||||
|
Reference in New Issue
Block a user