From: Kevin Ottens Date: Thu, 23 Jul 2020 15:55:38 +0000 (+0200) Subject: Let Theme tell us if we're branded or not X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~45^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=14ecf535f9a9153c6cbbac862857c397628c8431;p=nextcloud-desktop.git Let Theme tell us if we're branded or not Signed-off-by: Kevin Ottens --- diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index 6e0e2760f..c5591a313 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -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; diff --git a/src/libsync/theme.h b/src/libsync/theme.h index 2ecbf6c81..79014dc48 100644 --- a/src/libsync/theme.h +++ b/src/libsync/theme.h @@ -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. *