diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-12 02:46:31 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-12 02:46:31 -0400 |
| commit | 45f0a9e78ac876a2a956bc538c6d34358703e338 (patch) | |
| tree | e05b9248f09255154359fb4237f5b36faed2800e /src/apiuseraccount.cpp | |
| parent | be1ee2a97c867a80c07c4b865c306977d96249dc (diff) | |
nexus info and stats in settings
cleaned up double logging for github
reset validation progress dialog parent just before the main window dies
removed unused APIStats from APIUserAccount, added isValid()
Diffstat (limited to 'src/apiuseraccount.cpp')
| -rw-r--r-- | src/apiuseraccount.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/apiuseraccount.cpp b/src/apiuseraccount.cpp index 596f8aa7..35a868d5 100644 --- a/src/apiuseraccount.cpp +++ b/src/apiuseraccount.cpp @@ -1,10 +1,32 @@ #include "apiuseraccount.h" +QString localizedUserAccountType(APIUserAccountTypes t) +{ + switch (t) + { + case APIUserAccountTypes::Regular: + return QObject::tr("Regular"); + + case APIUserAccountTypes::Premium: + return QObject::tr("Premium"); + + case APIUserAccountTypes::None: // fall-through + default: + return QObject::tr("None"); + } +} + + APIUserAccount::APIUserAccount() : m_type(APIUserAccountTypes::None) { } +bool APIUserAccount::isValid() const +{ + return !m_key.isEmpty(); +} + const QString& APIUserAccount::apiKey() const { return m_key; |
