From a5b4501ef6fb4b8f00af8cc5d93d850577cbed66 Mon Sep 17 00:00:00 2001 From: scribblemaniac Date: Mon, 10 Jun 2019 11:20:03 -0600 Subject: [PATCH] Add compile/runtime Qt version to About dialog With the new legacy builds, the version with which Pencil2D was compiled with has become a critical piece of information to determine the version of an application. --- app/src/aboutdialog.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/app/src/aboutdialog.cpp b/app/src/aboutdialog.cpp index edb6a3221..df2881d4d 100644 --- a/app/src/aboutdialog.cpp +++ b/app/src/aboutdialog.cpp @@ -42,14 +42,23 @@ void AboutDialog::init() QStringList devText; devText << tr("Version: %1", "Version Number in About Dialog").arg(APP_VERSION); #if defined(GIT_EXISTS) && defined(NIGHTLY_BUILD) - devText << "commit: " S__GIT_COMMIT_HASH ; - devText << "date: " S__GIT_TIMESTAMP ; + devText << "commit: " S__GIT_COMMIT_HASH + << "date: " S__GIT_TIMESTAMP; #endif #if !defined(PENCIL2D_RELEASE) devText << "Development build"; #endif - devText << QString("Operating System: %1").arg(QSysInfo::prettyProductName()); - devText << QString("CPU Architecture: %1").arg(QSysInfo::buildCpuArchitecture()); + devText << QString("Operating System: %1").arg(QSysInfo::prettyProductName()) + << QString("CPU Architecture: %1").arg(QSysInfo::buildCpuArchitecture()); + if(QString(qVersion()) == QT_VERSION_STR) + { + devText << QString("Qt Version: %1").arg(QT_VERSION_STR); + } + else + { + devText << QString("Compile-Time Qt Version: %1").arg(QT_VERSION_STR) + << QString("Runtime Qt Version: %1").arg(qVersion()); + } ui->devInfoText->setText(devText.join("
")); QPushButton* copyToClipboardButton = new QPushButton(tr("Copy to clipboard", "Copy system info from About Dialog"));