mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-15 21:32:12 -05:00
Allow copy-pasting version info
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>383</width>
|
||||
<width>388</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -53,6 +53,9 @@
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextInteractionFlag::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -8,20 +8,20 @@ AboutPorymap::AboutPorymap(QWidget *parent) :
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
static const QString commitHash = PORYMAP_LATEST_COMMIT;
|
||||
this->ui->label_Version->setText(getVersionString());
|
||||
|
||||
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
}
|
||||
|
||||
QString AboutPorymap::getVersionString() {
|
||||
static const QString commitHash = PORYMAP_LATEST_COMMIT;
|
||||
return QString("Version %1%2\nQt %3 (%4)\n%5")
|
||||
static const QString commitHash = QStringLiteral(PORYMAP_LATEST_COMMIT);
|
||||
static const QString versionString = QString("Version %1%2\nQt %3 (%4)\n%5")
|
||||
.arg(QCoreApplication::applicationVersion())
|
||||
.arg(commitHash.isEmpty() ? "" : QString(" (%1)").arg(commitHash))
|
||||
.arg(QStringLiteral(QT_VERSION_STR))
|
||||
.arg(QSysInfo::buildCpuArchitecture())
|
||||
.arg(QStringLiteral(__DATE__));
|
||||
return versionString;
|
||||
}
|
||||
|
||||
AboutPorymap::~AboutPorymap()
|
||||
|
||||
Reference in New Issue
Block a user