# HG changeset patch # User Chris Cannam # Date 1569843326 -3600 # Node ID 7079871e62c9cd24eafe864c4de3925a07525bee # Parent 5ff3eb39e5806b0ee2aad86295267c5225c92111 Expand release text diff -r 5ff3eb39e580 -r 7079871e62c9 main/MainWindow.cpp --- a/main/MainWindow.cpp Fri Sep 27 16:02:44 2019 +0100 +++ b/main/MainWindow.cpp Mon Sep 30 12:35:26 2019 +0100 @@ -3262,6 +3262,33 @@ delete d; } +QString +MainWindow::getReleaseText() const +{ + bool debug = false; + QString version = "(unknown version)"; + +#ifdef BUILD_DEBUG + debug = true; +#endif // BUILD_DEBUG +#ifdef TONY_VERSION +#ifdef SVNREV + version = tr("Release %1 : Revision %2").arg(TONY_VERSION).arg(SVNREV); +#else // !SVNREV + version = tr("Release %1").arg(TONY_VERSION); +#endif // SVNREV +#else // !TONY_VERSION +#ifdef SVNREV + version = tr("Unreleased : Revision %1").arg(SVNREV); +#endif // SVNREV +#endif // TONY_VERSION + + return tr("%1 : %2 configuration, %3-bit build") + .arg(version) + .arg(debug ? tr("Debug") : tr("Release")) + .arg(sizeof(void *) * 8); +} + void MainWindow::about() { @@ -3277,9 +3304,7 @@ aboutText += tr("
Tony is a program for interactive note and pitch analysis and annotation.
"); - aboutText += tr("%1 : %2 configuration
") - .arg(version) - .arg(debug ? tr("Debug") : tr("Release")); + aboutText += QString("%1
").arg(getReleaseText()); aboutText += tr("Using Qt framework version %1.
") .arg(QT_VERSION_STR); diff -r 5ff3eb39e580 -r 7079871e62c9 main/MainWindow.h --- a/main/MainWindow.h Fri Sep 27 16:02:44 2019 +0100 +++ b/main/MainWindow.h Mon Sep 30 12:35:26 2019 +0100 @@ -229,6 +229,8 @@ QString exportToSVL(QString path, Layer *layer); FileOpenStatus importPitchLayer(FileSource source); + QString getReleaseText() const; + virtual void setupMenus(); virtual void setupFileMenu(); virtual void setupEditMenu();