Skip to content

Commit

Permalink
Merge pull request #11862 from fwcd/about-qt-version
Browse files Browse the repository at this point in the history
DlgAbout: Add Qt version to the dialog
  • Loading branch information
Holzhaus authored Aug 25, 2023
2 parents dfde28d + e278e1d commit 1ba54fc
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 23 deletions.
1 change: 1 addition & 0 deletions src/dialog/dlgabout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ DlgAbout::DlgAbout()
version_label->setText(VersionStore::applicationName() +
QStringLiteral(" ") + VersionStore::version());
git_version_label->setText(VersionStore::gitVersion());
qt_version_label->setText(VersionStore::qtVersion());
platform_label->setText(VersionStore::platform());
QLocale locale;
date_label->setText(locale.toString(VersionStore::date().toLocalTime(), QLocale::LongFormat));
Expand Down
63 changes: 40 additions & 23 deletions src/dialog/dlgaboutdlg.ui
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,27 @@
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="1">
<widget class="QLabel" name="platform_label">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Git Version:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="git_version_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Unknown</string>
</property>
Expand All @@ -91,38 +110,29 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Date:</string>
<string>Qt Version:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="1" column="1">
<widget class="QLabel" name="qt_version_label">
<property name="text">
<string>Git Version:</string>
<string>Unknown</string>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Platform:</string>
<string>Date:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="git_version_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="2" column="1">
<widget class="QLabel" name="date_label">
<property name="text">
<string>Unknown</string>
</property>
Expand All @@ -131,8 +141,15 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="date_label">
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Platform:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="platform_label">
<property name="text">
<string>Unknown</string>
</property>
Expand Down
5 changes: 5 additions & 0 deletions src/util/versionstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ QString VersionStore::gitVersion() {
return gitVersion;
}

// static
QString VersionStore::qtVersion() {
return qVersion();
}

// static
QString VersionStore::buildFlags() {
return kBuildFlags;
Expand Down
3 changes: 3 additions & 0 deletions src/util/versionstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ class VersionStore {
/// Returns the output of "git describe" and the branch name (if available)
static QString gitVersion();

/// Returns the version of Qt used to build Mixxx.
static QString qtVersion();

/// Returns the build flags used to build Mixxx (e.g. "hid=1 modplug=0") or
/// the null string if the flags are unknown.
static QString buildFlags();
Expand Down

0 comments on commit 1ba54fc

Please sign in to comment.