From 1f4cdd1f3c0c5592ebd6fd9d93534586ddbc3b20 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 7 Jan 2018 03:20:27 +0100 Subject: [PATCH] Logging: also print pointer size of building architecture --- app/main.cpp | 9 +++++++-- appsrv/main.cpp | 9 +++++++-- sdrgui/mainwindow.cpp | 9 +++++---- sdrsrv/maincore.cpp | 19 ++++++++++--------- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/app/main.cpp b/app/main.cpp index 09e1c6e12..c50a5a874 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -95,14 +95,19 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo parser.parse(*qApp); #if QT_VERSION >= 0x050400 - qInfo("%s v%s Qt %s %s %s", + qInfo("%s %s Qt %s %db %s %s", qPrintable(qApp->applicationName()), qPrintable(qApp->applicationVersion()), qPrintable(QString(QT_VERSION_STR)), + QT_POINTER_SIZE*8, qPrintable(QSysInfo::currentCpuArchitecture()), qPrintable(QSysInfo::prettyProductName())); #else - qInfo("%s v%s Qt %s", qPrintable(qApp->applicationName()), qPrintable((qApp->applicationVersion()), qPrintable(QString(QT_VERSION_STR))); + qInfo("%s %s Qt %s %db", + qPrintable(qApp->applicationName()), + qPrintable((qApp->applicationVersion()), + qPrintable(QString(QT_VERSION_STR)), + QT_POINTER_SIZE*8); #endif MainWindow w(logger, parser); diff --git a/appsrv/main.cpp b/appsrv/main.cpp index b4de7070d..8e508bae6 100644 --- a/appsrv/main.cpp +++ b/appsrv/main.cpp @@ -65,14 +65,19 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo parser.parse(a); #if QT_VERSION >= 0x050400 - qInfo("%s v%s Qt %s %s %s", + qInfo("%s %s Qt %s %db %s %s", qPrintable(qApp->applicationName()), qPrintable(qApp->applicationVersion()), qPrintable(QString(QT_VERSION_STR)), + QT_POINTER_SIZE*8, qPrintable(QSysInfo::currentCpuArchitecture()), qPrintable(QSysInfo::prettyProductName())); #else - qInfo("%s v%s Qt %s", qPrintable(qApp->applicationName()), qPrintable((qApp->applicationVersion()), qPrintable(QString(QT_VERSION_STR))); + qInfo("%s %s Qt %s %db", + qPrintable(qApp->applicationName()), + qPrintable((qApp->applicationVersion()), + qPrintable(QString(QT_VERSION_STR)), + QT_POINTER_SIZE*8); #endif MainCore m(logger, parser, &a); diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index ce5da9501..7667db39c 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -1729,19 +1729,20 @@ void MainWindow::setLoggingOptions() if (m_settings.getUseLogFile()) { #if QT_VERSION >= 0x050400 - QString appInfoStr(tr("%1 v%2 Qt %3 %4 %5") + QString appInfoStr(tr("%1 %2 Qt %3 %4b %5 %6") .arg(qApp->applicationName()) .arg(qApp->applicationVersion()) .arg(QT_VERSION_STR) + .arg(QT_POINTER_SIZE*8) .arg(QSysInfo::currentCpuArchitecture()) .arg(QSysInfo::prettyProductName())); #else - QString appInfoStr(tr("%1 v%2 Qt %3") + QString appInfoStr(tr("%1 v%2 Qt %3 %4b") .arg(qApp->applicationName()) .arg(qApp->applicationVersion()) - .arg(QT_VERSION_STR)); + .arg(QT_VERSION_STR) + .arg(QT_POINTER_SIZE*8)); #endif - m_logger->logToFile(QtInfoMsg, appInfoStr); } } diff --git a/sdrsrv/maincore.cpp b/sdrsrv/maincore.cpp index a7a10e7d3..6598a94ad 100644 --- a/sdrsrv/maincore.cpp +++ b/sdrsrv/maincore.cpp @@ -221,19 +221,20 @@ void MainCore::setLoggingOptions() if (m_settings.getUseLogFile()) { #if QT_VERSION >= 0x050400 - QString appInfoStr(tr("%1 v%2 Qt %3 %4 %5") - .arg(QCoreApplication::instance()->applicationName()) - .arg(QCoreApplication::instance()->applicationVersion()) + QString appInfoStr(tr("%1 %2 Qt %3 %4b %5 %6") + .arg(qApp->applicationName()) + .arg(qApp->applicationVersion()) .arg(QT_VERSION_STR) + .arg(QT_POINTER_SIZE*8) .arg(QSysInfo::currentCpuArchitecture()) .arg(QSysInfo::prettyProductName())); #else - QString appInfoStr(tr("%1 v%2 Qt %3") - .arg(QCoreApplication::instance()->applicationName()) - .arg(QCoreApplication::instance()->applicationVersion()) - .arg(QT_VERSION_STR)); -#endif - + QString appInfoStr(tr("%1 v%2 Qt %3 %4b") + .arg(qApp->applicationName()) + .arg(qApp->applicationVersion()) + .arg(QT_VERSION_STR) + .arg(QT_POINTER_SIZE*8)); + #endif m_logger->logToFile(QtInfoMsg, appInfoStr); } }