diff options
author | Fabian Müller <fmueller@owncloud.com> | 2022-06-15 18:04:05 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-06-21 12:11:27 +0300 |
commit | 1bee13bcef166df6281d3ee654bdedb8a7c32cb1 (patch) | |
tree | 06a09e597e77aa2b9bb08d1e8afe6da7e9c7ce21 /src/libsync | |
parent | aefc4bdd6f49552d0062ea7964abfe63cdb6d550 (diff) |
Move app password label above credentials form
Diffstat (limited to 'src/libsync')
-rw-r--r-- | src/libsync/theme.cpp | 14 | ||||
-rw-r--r-- | src/libsync/theme.h | 7 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index 2cfceb452..4ef29f6e5 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -686,5 +686,19 @@ bool Theme::allowDuplicatedFolderSyncPair() const return true; } +template <> +OWNCLOUDSYNC_EXPORT QString Utility::enumToDisplayName(Theme::UserIDType userIdType) +{ + switch (userIdType) { + case Theme::UserIDUserName: + return QCoreApplication::tr("Username"); + case Theme::UserIDEmail: + return QCoreApplication::tr("E-mail address"); + case Theme::UserIDCustom: + return Theme::instance()->customUserID(); + default: + Q_UNREACHABLE(); + } +} } // end namespace client diff --git a/src/libsync/theme.h b/src/libsync/theme.h index d1ef9fc33..252cf118e 100644 --- a/src/libsync/theme.h +++ b/src/libsync/theme.h @@ -15,9 +15,11 @@ #ifndef _THEME_H #define _THEME_H +#include "common/utility.h" +#include "syncresult.h" + #include <QFileInfo> #include <QObject> -#include "syncresult.h" class QIcon; class QString; @@ -477,5 +479,8 @@ private: const bool _hasBrandedDark = hasTheme(IconType::BrandedIcon, QStringLiteral("dark")); #endif }; + +template <> +QString OCC::Utility::enumToDisplayName(Theme::UserIDType userIdType); } #endif // _THEME_H |