-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.h
More file actions
26 lines (25 loc) · 783 Bytes
/
version.h
File metadata and controls
26 lines (25 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <QMessageBox>
#include <QSysInfo>
void display_version_dialog()
{
QString OS;
#if defined(Q_OS_LINUX)
OS = "Operating system: Linux";
#elif defined(Q_OS_WIN32)
OS = "Operating system: Windows";
#elif defined(Q_OS_MAC)
OS = "Operating system: Mac";
#else
OS = "Operating system: Unknown or unsupported";
#endif
QMessageBox version_info;
version_info.setText(QString("The current version is: v1-WIP").leftJustified(100));
version_info.setWindowTitle("Version info");
version_info.setDetailedText(
"The current build branch is: \n"
"The current commit sha1 is: HEAD\n"
"Compiled with: gcc (Gentoo 5.4.0-r3 p1.3, pie-0.6.5) 5.4.0\n" + OS
);
version_info.setWindowFlags(version_info.windowFlags());
version_info.exec();
}