diff --git a/about.cpp b/about.cpp index c7b366e49..61e3988fe 100644 --- a/about.cpp +++ b/about.cpp @@ -1,16 +1,24 @@ #include "about.h" -#include "ui_about.h" +#include +#include +#include "revision_utils.hpp" + +#include "ui_about.h" #include "moc_about.cpp" -CAboutDlg::CAboutDlg(QString const& program_title, QWidget *parent) : +CAboutDlg::CAboutDlg(QWidget *parent) : QDialog(parent), ui(new Ui::CAboutDlg) { ui->setupUi(this); - ui->labelTxt->setText ("

" + program_title + "

\n\n" + ui->labelTxt->setText ("

" + + QString {"WSJT-X v" + + QCoreApplication::applicationVersion () + + " " + revision ()}.simplified () + + "

\n\n" "WSJT-X implements digital modes JT9 and JT65 for
" "Amateur Radio communication.

" "© 2001-2014 by Joe Taylor, K1JT, with grateful
" diff --git a/about.h b/about.h index f0938ccfe..c2ac75d1b 100644 --- a/about.h +++ b/about.h @@ -14,7 +14,7 @@ class CAboutDlg : public QDialog Q_OBJECT; public: - explicit CAboutDlg(QString const& program_title, QWidget *parent = nullptr); + explicit CAboutDlg(QWidget *parent = nullptr); ~CAboutDlg (); private: diff --git a/main.cpp b/main.cpp index 310456c3d..8ead854fe 100644 --- a/main.cpp +++ b/main.cpp @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) QStandardPaths::setTestModeEnabled (parser.isSet (test_option)); // support for multiple instances running from a single installation - if (parser.isSet (rig_option)) + if (parser.isSet (rig_option) || parser.isSet (test_option)) { auto temp_name = parser.value (rig_option); if (!temp_name.isEmpty ()) @@ -98,12 +98,13 @@ int main(int argc, char *argv[]) } a.setApplicationName (a.applicationName () + " - " + temp_name); - - if (parser.isSet (test_option)) - { - a.setApplicationName (a.applicationName () + " - test"); - } } + + if (parser.isSet (test_option)) + { + a.setApplicationName (a.applicationName () + " - test"); + } + multiple = true; } diff --git a/mainwindow.cpp b/mainwindow.cpp index 7cb51d533..ec1b5f1ba 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -740,7 +740,7 @@ void MainWindow::monitor (bool state) void MainWindow::on_actionAbout_triggered() //Display "About" { - CAboutDlg {program_title (m_revision), this}.exec (); + CAboutDlg {this}.exec (); } void MainWindow::on_autoButton_clicked (bool checked) @@ -3134,7 +3134,7 @@ void MainWindow::pskSetLocal () psk_Reporter->setLocalStation( m_config.my_callsign () , m_config.my_grid () - , antenna_description, program_title (m_revision)); + , antenna_description, QString {"WSJT-X v" + version() + " " + m_revision}.simplified ()); } void MainWindow::transmitDisplay (bool transmitting) diff --git a/revision_utils.cpp b/revision_utils.cpp index b3413fbec..fe31beb7b 100644 --- a/revision_utils.cpp +++ b/revision_utils.cpp @@ -78,11 +78,6 @@ QString version () QString program_title (QString const& revision) { - QString id {QCoreApplication::applicationName ()}; -#if defined (CMAKE_BUILD) - id += " v" + version (); -#else - id += " Not for Release"; -#endif + QString id {QCoreApplication::applicationName () + " v" + QCoreApplication::applicationVersion ()}; return id + " " + revision + " by K1JT"; }