File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,11 +25,6 @@ CONFIG += c++14
2525VERSION = " 1.1"
2626
2727DEFINES += " _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
3429linux {
3530 contains (QMAKE_HOST.arch, x86_64 ): {
Original file line number Diff line number Diff line change 1515 * *
1616 ***********************************************************************************************/
1717
18+ #include < QtGlobal>
1819#include " AboutDialog.h"
1920
2021AboutDialog::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}
You can’t perform that action at this time.
0 commit comments