diff options
author | Tobias Markmann <tm@ayena.de> | 2016-01-21 12:27:54 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2016-01-24 16:39:48 (GMT) |
commit | 0952786705da1cd36992f4f5e24bf744187a37f8 (patch) | |
tree | 45677cff43b7af88f70568749e9772bf967f22a0 /Swift | |
parent | 52e685379436794cc0e4c2687c35f5e69a2f09a7 (diff) | |
download | swift-0952786705da1cd36992f4f5e24bf744187a37f8.zip swift-0952786705da1cd36992f4f5e24bf744187a37f8.tar.bz2 |
Change version information in about dialog to be selectable
This is to allow easy copy and paste of Swift version, Qt
build version and Qt runtime version into potential bug
reports.
Test-Information:
Tested changed UI behavior on OS X 10.11.2 with Qt 5.4.2.
Change-Id: I6234f08e77402c3d1ec2f5b7a98c19b059a445ea
Diffstat (limited to 'Swift')
-rw-r--r-- | Swift/QtUI/QtAboutWidget.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Swift/QtUI/QtAboutWidget.cpp b/Swift/QtUI/QtAboutWidget.cpp index 7145384..9fb07ed 100644 --- a/Swift/QtUI/QtAboutWidget.cpp +++ b/Swift/QtUI/QtAboutWidget.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -39,15 +39,10 @@ QtAboutWidget::QtAboutWidget() : QDialog() { QLabel* appNameLabel = new QLabel("<center><font size='+1'><b>" + QCoreApplication::applicationName() + "</b></font></center>", this); mainLayout->addWidget(appNameLabel); - QLabel* versionLabel = new QLabel(QString("<center><font size='-1'>") + tr("Version %1").arg(QCoreApplication::applicationVersion()) + "</font></center>", this); + QLabel* versionLabel = new QLabel((QString("<center><font size='-1'>") + tr("Version %1") + "</font></center><center><font size='-1'><br/>" + QString(tr("Built with Qt %2")) + QString("<br/>") + QString(tr("Running with Qt %3")) + "</font></center>").arg(QCoreApplication::applicationVersion()).arg(QT_VERSION_STR).arg(qVersion())); + versionLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); mainLayout->addWidget(versionLabel); - QString buildString = QString("<center><font size='-1'>") + QString(tr("Built with Qt %1")).arg(QT_VERSION_STR); - buildString += QString("<br/>") + QString(tr("Running with Qt %1")).arg(qVersion()); - buildString += "</font></center>"; - QLabel* buildLabel = new QLabel(buildString, this); - mainLayout->addWidget(buildLabel); - if (QCoreApplication::translate("TRANSLATION_INFO", "TRANSLATION_AUTHOR") != "TRANSLATION_AUTHOR") { mainLayout->addWidget(new QLabel(QString("<center><font size='-1'>") + QString(tr("Using the English translation by\n%1")).arg(QCoreApplication::translate("TRANSLATION_INFO", "TRANSLATION_AUTHOR")).replace("\n", "<br/>") + "</font></center>", this)); } |