1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 06:53:53 +00:00

Added compile date and time to the version info in the launcher

This commit is contained in:
pvdk 2014-01-22 18:37:49 +01:00
parent fa186f5ec1
commit c354cd52be

View file

@ -3,6 +3,8 @@
#include <components/version/version.hpp> #include <components/version/version.hpp>
#include <QLabel> #include <QLabel>
#include <QDate>
#include <QTime>
#include <QPushButton> #include <QPushButton>
#include <QFontDatabase> #include <QFontDatabase>
#include <QInputDialog> #include <QInputDialog>
@ -74,7 +76,12 @@ Launcher::MainDialog::MainDialog(QWidget *parent)
QString revision(OPENMW_VERSION_COMMIT); QString revision(OPENMW_VERSION_COMMIT);
revision = revision.left(10); revision = revision.left(10);
QDate date(QDate::fromString(__DATE__, QLatin1String("MMM dd yyyy")));
QTime time(QTime::fromString(__TIME__, QLatin1String("hh:m:ss")));
versionLabel->setText(tr("OpenMW %0 revision %1").arg(OPENMW_VERSION, revision)); versionLabel->setText(tr("OpenMW %0 revision %1").arg(OPENMW_VERSION, revision));
versionLabel->setToolTip(tr("Compiled on %0 %1").arg(date.toString(Qt::SystemLocaleShortDate),
time.toString(Qt::SystemLocaleShortDate)));
createIcons(); createIcons();
} }