File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
2+ VERSION = v1.0.0
3+
4+ DEFINES += DEBUG
5+
6+ DEFINES += GIT_HASH =" \\\" $(shell git --git-dir \ ""$$PWD/.git"\" rev-parse --short HEAD)\\\""
7+ DEFINES += GIT_BRANCH =" \\\" $(shell git --git-dir \ ""$$PWD/.git"\" rev-parse --abbrev-ref HEAD)\\\""
8+
9+ DEFINES += APP_VERSION =\ \\"$$VERSION\\\"
10+
211QT += core gui widgets serialbus
312
413TARGET = ModbusTestSlave
Original file line number Diff line number Diff line change @@ -72,6 +72,16 @@ MainWindow::MainWindow(QWidget *parent) :
7272
7373 /* Don't stretch columns, resize to contents */
7474 _pUi->tblRegData ->horizontalHeader ()->setSectionResizeMode (QHeaderView::ResizeToContents);
75+
76+ QString debugTxt;
77+ #ifdef DEBUG
78+ debugTxt = QString (tr (" beta (git %1:%2)" )).arg (GIT_BRANCH).arg (GIT_HASH);
79+ #endif
80+
81+ QString windowCaption;
82+ windowCaption = QString (" ModbusTestSlave %1%2" ).arg (APP_VERSION).arg (debugTxt);
83+
84+ setWindowTitle (windowCaption);
7585}
7686
7787MainWindow::~MainWindow ()
You can’t perform that action at this time.
0 commit comments