Merge pull request #992 from Scrumplex/refactor-version

This commit is contained in:
Sefa Eyeoglu
2022-08-20 12:50:25 +02:00
committed by GitHub
13 changed files with 56 additions and 55 deletions

View File

@ -147,10 +147,15 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia
else
ui->platformLabel->setVisible(false);
if (BuildConfig.VERSION_BUILD >= 0)
ui->buildNumLabel->setText(tr("Build Number") +": " + QString::number(BuildConfig.VERSION_BUILD));
if (!BuildConfig.GIT_COMMIT.isEmpty())
ui->commitLabel->setText(tr("Commit: %1").arg(BuildConfig.GIT_COMMIT));
else
ui->buildNumLabel->setVisible(false);
ui->commitLabel->setVisible(false);
if (!BuildConfig.BUILD_DATE.isEmpty())
ui->buildDateLabel->setText(tr("Build date: %1").arg(BuildConfig.BUILD_DATE));
else
ui->buildDateLabel->setVisible(false);
if (!BuildConfig.VERSION_CHANNEL.isEmpty())
ui->channelLabel->setText(tr("Channel") +": " + BuildConfig.VERSION_CHANNEL);

View File

@ -184,12 +184,28 @@
</widget>
</item>
<item>
<widget class="QLabel" name="buildNumLabel">
<widget class="QLabel" name="buildDateLabel">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>Build Number:</string>
<string>Build Date:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="commitLabel">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>Commit:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>