aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth/AccountList.cpp
diff options
context:
space:
mode:
authorADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>2022-11-15 10:05:04 +0200
committerADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>2022-11-15 10:05:04 +0200
commitba46ff6692beb49c32260a962894c53996c32ccf (patch)
tree4df8660508f0e93587f9d0fb221bed960f0d7b31 /launcher/minecraft/auth/AccountList.cpp
parentcca052ccc9d644c84384ceefe97bbce45381a9e2 (diff)
parentcedc7754d96e4c53d50bcce2b2a0f139b840f3d0 (diff)
downloadPrismLauncher-ba46ff6692beb49c32260a962894c53996c32ccf.tar.gz
PrismLauncher-ba46ff6692beb49c32260a962894c53996c32ccf.tar.bz2
PrismLauncher-ba46ff6692beb49c32260a962894c53996c32ccf.zip
Merge remote-tracking branch 'upstream/develop' into feature/instance-shortcuts
Diffstat (limited to 'launcher/minecraft/auth/AccountList.cpp')
-rw-r--r--launcher/minecraft/auth/AccountList.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/launcher/minecraft/auth/AccountList.cpp b/launcher/minecraft/auth/AccountList.cpp
index b3b57c74..9e2fd111 100644
--- a/launcher/minecraft/auth/AccountList.cpp
+++ b/launcher/minecraft/auth/AccountList.cpp
@@ -408,20 +408,20 @@ QVariant AccountList::headerData(int section, Qt::Orientation orientation, int r
}
}
-int AccountList::rowCount(const QModelIndex &) const
+int AccountList::rowCount(const QModelIndex &parent) const
{
// Return count
- return count();
+ return parent.isValid() ? 0 : count();
}
-int AccountList::columnCount(const QModelIndex &) const
+int AccountList::columnCount(const QModelIndex &parent) const
{
- return NUM_COLUMNS;
+ return parent.isValid() ? 0 : NUM_COLUMNS;
}
Qt::ItemFlags AccountList::flags(const QModelIndex &index) const
{
- if (index.row() < 0 || index.row() >= rowCount(index) || !index.isValid())
+ if (index.row() < 0 || index.row() >= rowCount(index.parent()) || !index.isValid())
{
return Qt::NoItemFlags;
}