aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth/AccountList.cpp
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-07-08 00:14:05 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-07-08 00:14:05 +0300
commitbc2940e16a8a7839a120a45be9232b5adebbe751 (patch)
tree5952ce6503d0a084b7b44c16441caf56999ce303 /launcher/minecraft/auth/AccountList.cpp
parentcf2393a50966f8dc84720f7d44538b0cb7649d46 (diff)
parent1131038fdb0093ef9c732b18d699b6176fc6d82c (diff)
downloadPrismLauncher-bc2940e16a8a7839a120a45be9232b5adebbe751.tar.gz
PrismLauncher-bc2940e16a8a7839a120a45be9232b5adebbe751.tar.bz2
PrismLauncher-bc2940e16a8a7839a120a45be9232b5adebbe751.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into settings
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
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();