diff options
author | RedsonBr140 <redson@riseup.net> | 2022-11-14 21:09:37 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 21:09:37 -0300 |
commit | 1e4ee02cbc0f44f390b33b5b85418f4eadffbae4 (patch) | |
tree | 6191253cc260c8ee6a5030d4b73f3cbed642d973 /launcher/minecraft/auth | |
parent | be765f8d883697d2284343f9ee6c858987622857 (diff) | |
parent | cedc7754d96e4c53d50bcce2b2a0f139b840f3d0 (diff) | |
download | PrismLauncher-1e4ee02cbc0f44f390b33b5b85418f4eadffbae4.tar.gz PrismLauncher-1e4ee02cbc0f44f390b33b5b85418f4eadffbae4.tar.bz2 PrismLauncher-1e4ee02cbc0f44f390b33b5b85418f4eadffbae4.zip |
Merge branch 'PrismLauncher:develop' into menu-themes
Diffstat (limited to 'launcher/minecraft/auth')
-rw-r--r-- | launcher/minecraft/auth/AccountList.cpp | 10 |
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; } |