Skip to content

Commit 81a88c6

Browse files
committed
Building under MS Windows has been fixed
1 parent c9c411a commit 81a88c6

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

oplpctools.pro

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ CONFIG += c++14
2525
VERSION = "1.1"
2626

2727
DEFINES += "_OPLPCTOOLS_VERSION=$$VERSION"
28-
win32 {
29-
DEFINES +="_OPLPCTOOLS_BUIDL_YEAR=$$system(echo "%date:~10,4%")"
30-
} else {
31-
DEFINES += "_OPLPCTOOLS_BUIDL_YEAR=$$system(date +%Y)"
32-
}
3328

3429
linux {
3530
contains(QMAKE_HOST.arch, x86_64): {

src/AboutDialog.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* *
1616
***********************************************************************************************/
1717

18+
#include <QtGlobal>
1819
#include "AboutDialog.h"
1920

2021
AboutDialog::AboutDialog(QWidget * _parent /*= nullptr*/) :
@@ -24,9 +25,10 @@ AboutDialog::AboutDialog(QWidget * _parent /*= nullptr*/) :
2425
QApplication * app = static_cast<QApplication *>(QApplication::instance());
2526
mp_label_app_name->setText(app->applicationDisplayName());
2627
static const int start_development_year = 2017;
27-
QString years = (start_development_year < _OPLPCTOOLS_BUIDL_YEAR) ?
28-
QString("%1 - %2").arg(start_development_year).arg(_OPLPCTOOLS_BUIDL_YEAR) :
29-
QString::number(_OPLPCTOOLS_BUIDL_YEAR);
28+
int build_year = QString(__DATE__).right(4).toInt();
29+
QString years = (start_development_year < build_year) ?
30+
QString("%1 - %2").arg(start_development_year).arg(build_year) :
31+
QString::number(build_year);
3032
mp_label_version->setText(mp_label_version->text().arg(QT_STRINGIFY(_OPLPCTOOLS_VERSION)));
3133
mp_label_description->setText(mp_label_description->text().arg(years));
3234
}

0 commit comments

Comments
 (0)