summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2010-05-11 10:28:29 +0200
committercon <qtc-committer@nokia.com>2010-05-12 17:07:59 +0200
commitacea722d7543560b3ee7dd79dd5ab6a545eb51de (patch)
tree3c8c3fff1a4f4bd4b0823b2a1ed10893e38d9b26
parentcf57bda96f1810a5386e7f8abdb98d9ef9c60207 (diff)
downloadqt-creator-acea722d7543560b3ee7dd79dd5ab6a545eb51de.tar.gz
Add a hook for the build system to specify a version description.
E.g. to show Qt Creator 1.3.85 (2.0.0-rc1)
-rw-r--r--src/plugins/coreplugin/coreconstants.h6
-rw-r--r--src/plugins/coreplugin/versiondialog.cpp16
2 files changed, 17 insertions, 5 deletions
diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h
index a0628c2af4..21adb03f5b 100644
--- a/src/plugins/coreplugin/coreconstants.h
+++ b/src/plugins/coreplugin/coreconstants.h
@@ -50,6 +50,12 @@ const char * const IDE_VERSION_LONG = IDE_VERSION;
const char * const IDE_AUTHOR = "Nokia Corporation";
const char * const IDE_YEAR = "2010";
+#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
diff --git a/src/plugins/coreplugin/versiondialog.cpp b/src/plugins/coreplugin/versiondialog.cpp
index c735e532be..e92b816272 100644
--- a/src/plugins/coreplugin/versiondialog.cpp
+++ b/src/plugins/coreplugin/versiondialog.cpp
@@ -61,7 +61,11 @@ VersionDialog::VersionDialog(QWidget *parent)
layout->setSizeConstraint(QLayout::SetFixedSize);
QString version = QLatin1String(IDE_VERSION_LONG);
- version += QDate(2007, 25, 10).toString(Qt::SystemLocaleDate);
+
+ QString ideVersionDescription;
+#ifdef IDE_VERSION_DESCRIPTION
+ ideVersionDescription = tr("(%1)").arg(QLatin1String(IDE_VERSION_DESCRIPTION_STR));
+#endif
QString ideRev;
#ifdef IDE_REVISION
@@ -70,21 +74,23 @@ VersionDialog::VersionDialog(QWidget *parent)
#endif
const QString description = tr(
- "<h3>Qt Creator %1</h3>"
+ "<h3>Qt Creator %1 %8</h3>"
"Based on Qt %2 (%3 bit)<br/>"
"<br/>"
"Built on %4 at %5<br />"
"<br/>"
- "%8"
+ "%9"
"<br/>"
"Copyright 2008-%6 %7. All rights reserved.<br/>"
"<br/>"
"The program is provided AS IS with NO WARRANTY OF ANY KIND, "
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
"PARTICULAR PURPOSE.<br/>")
- .arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
+ .arg(version,
+ QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR),
- (QLatin1String(IDE_AUTHOR)), ideRev);
+ (QLatin1String(IDE_AUTHOR)), ideVersionDescription,
+ ideRev);
QLabel *copyRightLabel = new QLabel(description);
copyRightLabel->setWordWrap(true);