Commit acea722d authored by con's avatar con
Browse files

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)
parent cf57bda9
...@@ -50,6 +50,12 @@ const char * const IDE_VERSION_LONG = IDE_VERSION; ...@@ -50,6 +50,12 @@ const char * const IDE_VERSION_LONG = IDE_VERSION;
const char * const IDE_AUTHOR = "Nokia Corporation"; const char * const IDE_AUTHOR = "Nokia Corporation";
const char * const IDE_YEAR = "2010"; 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 #ifdef IDE_REVISION
const char * const IDE_REVISION_STR = STRINGIFY(IDE_REVISION); const char * const IDE_REVISION_STR = STRINGIFY(IDE_REVISION);
#else #else
......
...@@ -61,7 +61,11 @@ VersionDialog::VersionDialog(QWidget *parent) ...@@ -61,7 +61,11 @@ VersionDialog::VersionDialog(QWidget *parent)
layout->setSizeConstraint(QLayout::SetFixedSize); layout->setSizeConstraint(QLayout::SetFixedSize);
QString version = QLatin1String(IDE_VERSION_LONG); 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; QString ideRev;
#ifdef IDE_REVISION #ifdef IDE_REVISION
...@@ -70,21 +74,23 @@ VersionDialog::VersionDialog(QWidget *parent) ...@@ -70,21 +74,23 @@ VersionDialog::VersionDialog(QWidget *parent)
#endif #endif
const QString description = tr( const QString description = tr(
"<h3>Qt Creator %1</h3>" "<h3>Qt Creator %1 %8</h3>"
"Based on Qt %2 (%3 bit)<br/>" "Based on Qt %2 (%3 bit)<br/>"
"<br/>" "<br/>"
"Built on %4 at %5<br />" "Built on %4 at %5<br />"
"<br/>" "<br/>"
"%8" "%9"
"<br/>" "<br/>"
"Copyright 2008-%6 %7. All rights reserved.<br/>" "Copyright 2008-%6 %7. All rights reserved.<br/>"
"<br/>" "<br/>"
"The program is provided AS IS with NO WARRANTY OF ANY KIND, " "The program is provided AS IS with NO WARRANTY OF ANY KIND, "
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
"PARTICULAR PURPOSE.<br/>") "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(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR),
(QLatin1String(IDE_AUTHOR)), ideRev); (QLatin1String(IDE_AUTHOR)), ideVersionDescription,
ideRev);
QLabel *copyRightLabel = new QLabel(description); QLabel *copyRightLabel = new QLabel(description);
copyRightLabel->setWordWrap(true); copyRightLabel->setWordWrap(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment