diff --git a/aboutdialog.cpp b/aboutdialog.cpp index f978970..9ca50e8 100644 --- a/aboutdialog.cpp +++ b/aboutdialog.cpp @@ -1,11 +1,16 @@ #include "aboutdialog.h" #include "ui_aboutdialog.h" +#include "version.h" + AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog) { ui->setupUi(this); + ui->label_VerBuildDate->setText(tr("Version %1, build date %2") + .arg(VERSION) + .arg(BUILD_DATE)); setWindowTitle(QCoreApplication::applicationName()); setFixedSize(sizeHint()); } diff --git a/aboutdialog.ui b/aboutdialog.ui index 57d4dc6..c264ac1 100644 --- a/aboutdialog.ui +++ b/aboutdialog.ui @@ -55,6 +55,16 @@ + + + + TextLabel + + + Qt::AlignCenter + + + diff --git a/embedded-ide.pro b/embedded-ide.pro index a3c0b05..cac635b 100644 --- a/embedded-ide.pro +++ b/embedded-ide.pro @@ -43,7 +43,8 @@ SOURCES += main.cpp\ qsvtextoperationswidget.cpp \ etags.cpp \ projectview.cpp \ - filedownloader.cpp + filedownloader.cpp \ + version.cpp HEADERS += mainwindow.h \ documentarea.h \ @@ -62,7 +63,8 @@ HEADERS += mainwindow.h \ qsvtextoperationswidget.h \ etags.h \ projectview.h \ - filedownloader.h + filedownloader.h \ + version.h FORMS += mainwindow.ui \ editorwidget.ui \ @@ -86,4 +88,3 @@ DISTFILES += \ reference-code-c.txt RC_ICONS = icon-theme/icon.ico - diff --git a/version.cpp b/version.cpp new file mode 100644 index 0000000..62addfd --- /dev/null +++ b/version.cpp @@ -0,0 +1,4 @@ +#include "version.h" + +const char *VERSION = "v0.1-rc2"; +const char *BUILD_DATE = __DATE__ " " __TIME__; diff --git a/version.h b/version.h new file mode 100644 index 0000000..a18efff --- /dev/null +++ b/version.h @@ -0,0 +1,7 @@ +#ifndef VERSION_H +#define VERSION_H + +extern const char *VERSION; +extern const char *BUILD_DATE; + +#endif // VERSION_H