Let Theme tell us if we're branded or not
authorKevin Ottens <kevin.ottens@nextcloud.com>
Thu, 23 Jul 2020 15:55:38 +0000 (17:55 +0200)
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>
Tue, 28 Jul 2020 09:20:34 +0000 (09:20 +0000)
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
src/libsync/theme.cpp
src/libsync/theme.h

index 6e0e2760ffc4c4db53e62b5de55416d698f06045..c5591a313408d4cac6e81fea8ca77281acfe0bc3 100644 (file)
@@ -91,6 +91,11 @@ QString Theme::statusHeaderText(SyncResult::Status status) const
     return resultStr;
 }
 
+bool Theme::isBranded() const
+{
+    return appNameGUI() != QStringLiteral("Nextcloud");
+}
+
 QString Theme::appNameGUI() const
 {
     return APPLICATION_NAME;
index 2ecbf6c8161ffcdd725ca096f7b0d4d7616ae9b0..79014dc485e8dc3a280539b29abd59e75d3610bf 100644 (file)
@@ -50,6 +50,16 @@ public:
 
     ~Theme();
 
+    /**
+     * @brief isBranded indicates if the current application is branded
+     *
+     * By default, it is considered branded if the APPLICATION_NAME is
+     * different from "Nextcloud".
+     *
+     * @return true if branded, false otherwise
+     */
+    virtual bool isBranded() const;
+
     /**
      * @brief appNameGUI - Human readable application name.
      *