aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth/AccountList.cpp
diff options
context:
space:
mode:
authorAsh <101582426+ashuntu@users.noreply.github.com>2023-07-28 21:22:35 +0000
committerGitHub <noreply@github.com>2023-07-28 21:22:35 +0000
commitd133b40b254630f988c57c1111e4659023324edc (patch)
tree96217214a39945ef04e0d191d960481825ac65da /launcher/minecraft/auth/AccountList.cpp
parent51d7a6289e1cf2df463ae8d7c0b08b4a61faea3c (diff)
parentbdec11c501a6438706f62465d89f2344f7856342 (diff)
downloadPrismLauncher-d133b40b254630f988c57c1111e4659023324edc.tar.gz
PrismLauncher-d133b40b254630f988c57c1111e4659023324edc.tar.bz2
PrismLauncher-d133b40b254630f988c57c1111e4659023324edc.zip
Merge branch 'PrismLauncher:develop' into develop
Diffstat (limited to 'launcher/minecraft/auth/AccountList.cpp')
-rw-r--r--launcher/minecraft/auth/AccountList.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/launcher/minecraft/auth/AccountList.cpp b/launcher/minecraft/auth/AccountList.cpp
index c2794147..d6f42b75 100644
--- a/launcher/minecraft/auth/AccountList.cpp
+++ b/launcher/minecraft/auth/AccountList.cpp
@@ -328,6 +328,9 @@ QVariant AccountList::data(const QModelIndex &index, int role) const
case AccountState::Gone: {
return tr("Gone", "Account status");
}
+ default: {
+ return tr("Unknown", "Account status");
+ }
}
}
@@ -354,11 +357,12 @@ QVariant AccountList::data(const QModelIndex &index, int role) const
return QVariant::fromValue(account);
case Qt::CheckStateRole:
- switch (index.column())
- {
- case ProfileNameColumn:
- return account == m_defaultAccount ? Qt::Checked : Qt::Unchecked;
+ if (index.column() == ProfileNameColumn) {
+ return account == m_defaultAccount ? Qt::Checked : Qt::Unchecked;
+ } else {
+ return QVariant();
}
+
default:
return QVariant();