Mercurial > hg > tony
changeset 598:7079871e62c9
Expand release text
author | Chris Cannam |
---|---|
date | Mon, 30 Sep 2019 12:35:26 +0100 |
parents | 5ff3eb39e580 |
children | 1f34943a4c9d |
files | main/MainWindow.cpp main/MainWindow.h |
diffstat | 2 files changed, 30 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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("<h3>About Tony</h3>"); aboutText += tr("<p>Tony is a program for interactive note and pitch analysis and annotation.</p>"); - aboutText += tr("<p>%1 : %2 configuration</p>") - .arg(version) - .arg(debug ? tr("Debug") : tr("Release")); + aboutText += QString("<p><small>%1</small></p>").arg(getReleaseText()); aboutText += tr("<p>Using Qt framework version %1.</p>") .arg(QT_VERSION_STR);
--- 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();