diff --git a/main.cpp b/main.cpp index db5d29676..19fa83665 100644 --- a/main.cpp +++ b/main.cpp @@ -48,12 +48,13 @@ int main(int argc, char *argv[]) // Override programs executable basename as application name. a.setApplicationName ("WSJT-X"); #if CMAKE_BUILD - a.setApplicationVersion (WSJTX_STRINGIZE (WSJTX_VERSION_MAJOR) - "." WSJTX_STRINGIZE (WSJTX_VERSION_MINOR) - "." WSJTX_STRINGIZE (WSJTX_VERSION_PATCH) " " + revision ()); + QString version {WSJTX_STRINGIZE (WSJTX_VERSION_MAJOR) + "." WSJTX_STRINGIZE (WSJTX_VERSION_MINOR) + "." WSJTX_STRINGIZE (WSJTX_VERSION_PATCH) " " + revision ()}; #else - a.setApplicationVersion ("1.4.0"); + QString version {"1.4.0"}; #endif + a.setApplicationVersion (version.trimmed ()); bool multiple {false}; diff --git a/mainwindow.cpp b/mainwindow.cpp index 093cfe671..955d44cfd 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -74,7 +74,7 @@ private: MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdmem, QString const& thekey, unsigned downSampleFactor, bool test_mode, QWidget *parent) : QMainWindow(parent), - m_revision {revision ("$Rev$")}, + m_revision {revision ()}, m_multiple {multiple}, m_settings (settings), ui(new Ui::MainWindow), @@ -3019,7 +3019,7 @@ void MainWindow::pskSetLocal () psk_Reporter->setLocalStation( m_config.my_callsign () , m_config.my_grid () - , antenna_description, "WSJT-X " + m_revision); + , antenna_description, program_title (m_revision)); } void MainWindow::transmitDisplay (bool transmitting) diff --git a/revision_utils.cpp b/revision_utils.cpp index 9f93c51e5..11454ab94 100644 --- a/revision_utils.cpp +++ b/revision_utils.cpp @@ -40,12 +40,7 @@ QString revision (QString const& svn_rev_string) } else if (!revision_from_svn.isEmpty ()) { - // fall back to revision in ths file, this is potentially - // wrong because svn only updates the id when this file is - // touched - // - // this case gets us a revision when someone builds from a - // source snapshot or copy + // fall back to revision passed in if any result = revision_from_svn; } else @@ -61,14 +56,10 @@ QString revision (QString const& svn_rev_string) #else if (!revision_from_svn.isEmpty ()) { - // not CMake build so all we have is svn revision in this file + // not CMake build so all we have is revision passed result = revision_from_svn; } #endif - if (result.isEmpty ()) - { - result = "local"; // last resort fall back - } return result.trimmed (); }