Print build and system information at the start of the log

pull/127/head
f4exb 2018-01-07 01:48:53 +01:00
rodzic 7bdc161c91
commit 05491fd62b
2 zmienionych plików z 25 dodań i 0 usunięć

Wyświetl plik

@ -20,6 +20,7 @@
#include <QProxyStyle>
#include <QStyleFactory>
#include <QFontDatabase>
#include <QSysInfo>
#include "loggerwithfile.h"
#include "mainwindow.h"
@ -93,6 +94,17 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
MainParser parser;
parser.parse(*qApp);
#if QT_VERSION >= 0x050400
qInfo("%s v%s Qt %s %s %s",
qPrintable(qApp->applicationName()),
qPrintable(qApp->applicationVersion()),
qPrintable(QString(QT_VERSION_STR)),
qPrintable(QSysInfo::currentCpuArchitecture()),
qPrintable(QSysInfo::prettyProductName()));
#else
qInfo("%s v%s Qt %s", qPrintable(qApp->applicationName()), qPrintable((qApp->applicationVersion()), qPrintable(QString(QT_VERSION_STR)));
#endif
MainWindow w(logger, parser);
w.show();

Wyświetl plik

@ -17,6 +17,7 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QCoreApplication>
#include <QSysInfo>
#include <signal.h>
#include <unistd.h>
@ -62,6 +63,18 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
MainParser parser;
parser.parse(a);
#if QT_VERSION >= 0x050400
qInfo("%s v%s Qt %s %s %s",
qPrintable(qApp->applicationName()),
qPrintable(qApp->applicationVersion()),
qPrintable(QString(QT_VERSION_STR)),
qPrintable(QSysInfo::currentCpuArchitecture()),
qPrintable(QSysInfo::prettyProductName()));
#else
qInfo("%s v%s Qt %s", qPrintable(qApp->applicationName()), qPrintable((qApp->applicationVersion()), qPrintable(QString(QT_VERSION_STR)));
#endif
MainCore m(logger, parser, &a);
// This will cause the application to exit when the main core is finished