Settings dialog About section: Show minimal version info

- Application name, version number, OS

  Example: Nextcloud Desktop Client
           Version 2.6.4 (macOS)

- Keep previous version info in new method Theme::aboutDetails()

Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
Michael Schuster 2020-03-07 06:38:09 +01:00
parent a471868d88
commit 2adde0fcca
No known key found for this signature in database
GPG key ID: 00819E3BF4177B28
2 changed files with 23 additions and 0 deletions

View file

@ -336,6 +336,24 @@ QString Theme::gitSHA1() const
}
QString Theme::about() const
{
// Shorten Qt's OS name: "macOS Mojave (10.14)" -> "macOS"
QStringList osStringList = Utility::platformName().split(QLatin1Char(' '));
QString osName = osStringList.at(0);
QString devString;
//: Example text: "<p>Nextcloud Desktop Client</p>" (%1 is the application name)
devString = tr("<p>%1 Desktop Client</p>")
.arg(APPLICATION_NAME);
devString += tr("<p>Version %1. For more information please click <a href='%2'>here</a>.</p>")
.arg(QString::fromLatin1(MIRALL_STRINGIFY(MIRALL_VERSION)) + QString(" (%1)").arg(osName))
.arg(helpUrl());
return devString;
}
QString Theme::aboutDetails() const
{
QString devString;
devString = tr("<p>Version %1. For more information please click <a href='%2'>here</a>.</p>")

View file

@ -205,6 +205,11 @@ public:
*/
virtual QString about() const;
/**
* Legal notice dialog version detail contents
*/
virtual QString aboutDetails() const;
/**
* Define if the systray icons should be using mono design
*/