1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 11:18:56 -05:00

Use QCoreApplication version to store and retrieve the version

This commit is contained in:
f4exb 2017-11-18 03:50:21 +01:00
parent 05ec6d1074
commit 8e1454152b
4 changed files with 13 additions and 4 deletions

View File

@ -33,6 +33,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
*/ */
QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangel"); QCoreApplication::setApplicationName("SDRangel");
QCoreApplication::setApplicationVersion("3.8.4");
#if 1 #if 1
qApp->setStyle(QStyleFactory::create("fusion")); qApp->setStyle(QStyleFactory::create("fusion"));

View File

@ -6,6 +6,7 @@ AboutDialog::AboutDialog(QWidget* parent) :
ui(new Ui::AboutDialog) ui(new Ui::AboutDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->version->setText(QString("Version %1 - Copyright (C) 2015-2017 Edouard Griffiths, F4EXB.").arg(qApp->applicationVersion()));
} }
AboutDialog::~AboutDialog() AboutDialog::~AboutDialog()

View File

@ -82,9 +82,16 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="version">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Version 3.8.4 - Copyright (C) 2015-2017 Edouard Griffiths, F4EXB. &lt;/p&gt;&lt;p&gt;Code at &lt;a href=&quot;https://github.com/f4exb/sdrangel&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/f4exb/sdrangel&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Many thanks to the original developers:&lt;/p&gt;&lt;p&gt;The osmocom developer team - especially horizon, Hoernchen &amp;amp; tnt.&lt;/p&gt;&lt;p&gt;Christian Daniel from maintech GmbH.&lt;/p&gt;&lt;p&gt;John Greb (hexameron) for the contributions in &lt;a href=&quot;https://github.com/hexameron/rtl-sdrangelove&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;RTL-SDRangelove&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The following rules apply to the SDRangel main application and libsdrbase:&lt;br/&gt;This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with this program. If not, see &lt;a href=&quot;http://www.gnu.org/licenses/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.gnu.org/licenses/&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;For the license of installed plugins, look into the plugin list.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>Here goes the version and copyright</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="info">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Code at &lt;a href=&quot;https://github.com/f4exb/sdrangel&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/f4exb/sdrangel&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Many thanks to the original developers:&lt;/p&gt;&lt;p&gt;The osmocom developer team - especially horizon, Hoernchen &amp;amp; tnt.&lt;/p&gt;&lt;p&gt;Christian Daniel from maintech GmbH.&lt;/p&gt;&lt;p&gt;John Greb (hexameron) for the contributions in &lt;a href=&quot;https://github.com/hexameron/rtl-sdrangelove&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;RTL-SDRangelove&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The following rules apply to the SDRangel main application and libsdrbase:&lt;br/&gt;This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with this program. If not, see &lt;a href=&quot;http://www.gnu.org/licenses/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.gnu.org/licenses/&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;For the license of installed plugins, look into the plugin list.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>

View File

@ -569,9 +569,9 @@ void MainWindow::createStatusBar()
{ {
QString qtVersionStr = QString("Qt %1 ").arg(QT_VERSION_STR); QString qtVersionStr = QString("Qt %1 ").arg(QT_VERSION_STR);
#if QT_VERSION >= 0x050400 #if QT_VERSION >= 0x050400
m_showSystemWidget = new QLabel("SDRangel v3.8.4 " + qtVersionStr + QSysInfo::prettyProductName(), this); m_showSystemWidget = new QLabel("SDRangel v" + qApp->applicationVersion() + " " + qtVersionStr + QSysInfo::prettyProductName(), this);
#else #else
m_showSystemWidget = new QLabel("SDRangel v3.8.4 " + qtVersionStr, this); m_showSystemWidget = new QLabel("SDRangel v" + qApp->applicationVersion() + " " + qtVersionStr, this);
#endif #endif
statusBar()->addPermanentWidget(m_showSystemWidget); statusBar()->addPermanentWidget(m_showSystemWidget);