From 62696a3a4881b8b38c6887b33945727ea137ae74 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 1 May 2020 15:59:32 +0200 Subject: [PATCH] [libcalamaresui] Remove the special * operator for string-enums in branding - This is a good example of being overly clever in C++ - the whole API with an enum requesting a specific string is a bit weird, although it makes sense from the 'might need more strings specified' point of view. --- src/libcalamaresui/Branding.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/libcalamaresui/Branding.h b/src/libcalamaresui/Branding.h index 78c0c54c1..0a275448f 100644 --- a/src/libcalamaresui/Branding.h +++ b/src/libcalamaresui/Branding.h @@ -209,6 +209,11 @@ public: public slots: QString string( StringEntry stringEntry ) const; + QString versionedName() const { return string( VersionedName ); } + QString productName() const { return string( ProductName ); } + QString shortProductName() const { return string( ShortProductName ); } + QString shortVersionedName() const { return string( ShortVersionedName ); } + QString styleString( StyleEntry styleEntry ) const; QString imagePath( ImageEntry imageEntry ) const; @@ -249,13 +254,6 @@ private: PanelSide m_navigationSide = PanelSide::Bottom; }; -template < typename U > -inline QString -operator*( U e ) -{ - return Branding::instance()->string( e ); -} - } // namespace Calamares #endif // BRANDING_H