diff options
| author | flow <flowlnlnln@gmail.com> | 2022-11-14 14:15:46 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-14 14:15:46 -0800 |
| commit | fece9e207bdae16574f450593346e80f50702b00 (patch) | |
| tree | 030dd7d9d47fe1dc47e76059f612e89004146836 /launcher/minecraft/auth | |
| parent | f60b09568c503fc52204ad3411d8ae0091d4877b (diff) | |
| parent | aef5349aee82922fb7cedab7489bc84766453700 (diff) | |
| download | PrismLauncher-fece9e207bdae16574f450593346e80f50702b00.tar.gz PrismLauncher-fece9e207bdae16574f450593346e80f50702b00.tar.bz2 PrismLauncher-fece9e207bdae16574f450593346e80f50702b00.zip | |
Merge pull request #448 from TheLastRar/fixup-warnings
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; } |
