diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2021-04-28 00:54:54 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2021-04-28 13:25:27 +0200 |
commit | 32f71415306ce9b1037a1e862bf81d680108665a (patch) | |
tree | 60ec560a26106fad0846591e3fb1c89d638927f9 /src/dialog | |
parent | 9ba57d6ad20920b1d413593ab40f5fc53ab717a4 (diff) |
DlgAbout: Show git-describe version
Diffstat (limited to 'src/dialog')
-rw-r--r-- | src/dialog/dlgabout.cpp | 29 | ||||
-rw-r--r-- | src/dialog/dlgaboutdlg.ui | 68 |
2 files changed, 65 insertions, 32 deletions
diff --git a/src/dialog/dlgabout.cpp b/src/dialog/dlgabout.cpp index 7174a46240..23003a132d 100644 --- a/src/dialog/dlgabout.cpp +++ b/src/dialog/dlgabout.cpp @@ -13,25 +13,9 @@ DlgAbout::DlgAbout(QWidget* parent) : QDialog(parent), Ui::DlgAboutDlg() { mixxx_icon->load(QString(":/images/mixxx_icon.svg")); mixxx_logo->load(QString(":/images/mixxx_logo.svg")); - QString mixxxVersion = VersionStore::version(); - QString gitBranch = VersionStore::gitBranch(); - QString buildRevision = VersionStore::developmentRevision(); - - QStringList version; - version.append(mixxxVersion); - - if (!gitBranch.isEmpty() || !buildRevision.isEmpty()) { - QStringList buildInfo; - buildInfo.append("build"); - if (!gitBranch.isEmpty()) { - buildInfo.append(gitBranch); - } - if (!buildRevision.isEmpty()) { - buildInfo.append(QString("r%1").arg(buildRevision)); - } - version.append(QString("(%1)").arg(buildInfo.join(" "))); - } - version_label->setText(version.join(" ")); + version_label->setText(VersionStore::applicationName() + + QStringLiteral(" ") + VersionStore::version()); + git_version_label->setText(VersionStore::gitVersion()); QFile licenseFile(":/LICENSE"); if (!licenseFile.open(QIODevice::ReadOnly)) { @@ -40,7 +24,12 @@ DlgAbout::DlgAbout(QWidget* parent) : QDialog(parent), Ui::DlgAboutDlg() { licenseText->setPlainText(licenseFile.readAll()); } - QString s_devTeam = tr("Mixxx %1 Development Team").arg(mixxxVersion); + QString s_devTeam = + tr("Mixxx %1.%2 Development Team") + .arg(QString::number( + VersionStore::versionNumber().majorVersion()), + QString::number(VersionStore::versionNumber() + .minorVersion())); QString s_contributions = tr("With contributions from:"); QString s_specialThanks = tr("And special thanks to:"); QString s_pastDevs = tr("Past Developers"); diff --git a/src/dialog/dlgaboutdlg.ui b/src/dialog/dlgaboutdlg.ui index f52c992ef1..fc53c5320f 100644 --- a/src/dialog/dlgaboutdlg.ui +++ b/src/dialog/dlgaboutdlg.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>300</width> - <height>424</height> + <width>494</width> + <height>513</height> </rect> </property> <property name="sizePolicy"> @@ -29,7 +29,7 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QSvgWidget" name="mixxx_icon"> + <widget class="QSvgWidget" name="mixxx_icon" native="true"> <property name="maximumSize"> <size> <width>32</width> @@ -39,7 +39,7 @@ </widget> </item> <item> - <widget class="QSvgWidget" name="mixxx_logo"> + <widget class="QSvgWidget" name="mixxx_logo" native="true"> <property name="maximumSize"> <size> <width>170</width> @@ -64,13 +64,49 @@ </layout> </item> <item> - <widget class="QLabel" name="version_label"> - <property name="text"> - <string notr="true">2.x.x</string> - </property> - <property name="textInteractionFlags"> - <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> - </property> + <widget class="QWidget" name="widget" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QLabel" name="version_label"> + <property name="text"> + <string notr="true">Mixxx 2.x.x</string> + </property> + <property name="textInteractionFlags"> + <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> + </property> + </widget> + </item> + <item> + <layout class="QGridLayout" name="gridLayout"> + <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> + </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> + <property name="text"> + <string>Git Version:</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> <item> @@ -107,7 +143,7 @@ <string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Droid Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:13pt;"> </span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">Credits go here</span><span style=" font-family:'Lucida Grande'; font-size:13pt;"> </span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;"><br /></p></body></html></string> @@ -182,8 +218,16 @@ p, li { white-space: pre-wrap; } </item> </layout> </widget> + <customwidgets> + <customwidget> + <class>QSvgWidget</class> + <extends>QWidget</extends> + <header>qsvgwidget.h</header> + </customwidget> + </customwidgets> <resources> <include location="../../res/mixxx.qrc"/> <include location="../../res/mixxx.qrc"/> </resources> + <connections/> </ui> |