From: Michael Schuster Date: Sat, 7 Mar 2020 05:38:09 +0000 (+0100) Subject: Settings dialog About section: Show minimal version info X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~323^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2adde0fcca34a0537afb218b3061e0427b074807;p=nextcloud-desktop.git 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 --- diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index fde29c416..48ceb5f93 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -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: "

Nextcloud Desktop Client

" (%1 is the application name) + devString = tr("

%1 Desktop Client

") + .arg(APPLICATION_NAME); + + devString += tr("

Version %1. For more information please click here.

") + .arg(QString::fromLatin1(MIRALL_STRINGIFY(MIRALL_VERSION)) + QString(" (%1)").arg(osName)) + .arg(helpUrl()); + + return devString; +} + +QString Theme::aboutDetails() const { QString devString; devString = tr("

Version %1. For more information please click here.

") diff --git a/src/libsync/theme.h b/src/libsync/theme.h index 12a643d00..2d0657648 100644 --- a/src/libsync/theme.h +++ b/src/libsync/theme.h @@ -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 */