Settings dialog About section: Show minimal version info
authorMichael Schuster <michael@schuster.ms>
Sat, 7 Mar 2020 05:38:09 +0000 (06:38 +0100)
committerMichael Schuster <michael@schuster.ms>
Sat, 7 Mar 2020 05:38:09 +0000 (06:38 +0100)
- 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>
src/libsync/theme.cpp
src/libsync/theme.h

index fde29c4165a51553c1c85056a1e7e92863f11a09..48ceb5f93c731d64b14bdc3a55946f3dfd8cf78c 100644 (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>")
index 12a643d0099d3437ec1ef924269672866412286b..2d06576482599940b23a8759179c7838698f2643 100644 (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
      */