diff options
author | Fayne Aldan <FayneAldan@gmail.com> | 2022-11-15 18:34:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-15 18:34:24 -0700 |
commit | e8b871ac72430c210e4750dcae8a119e8d757e20 (patch) | |
tree | 243cf3dabfb9316c92414994e47a1861497906b5 /launcher/minecraft/mod/ResourceFolderModel.h | |
parent | 9f30c6d94b3c3fd5dbc5f998c9e9c8083b4d57df (diff) | |
parent | cedc7754d96e4c53d50bcce2b2a0f139b840f3d0 (diff) | |
download | PrismLauncher-e8b871ac72430c210e4750dcae8a119e8d757e20.tar.gz PrismLauncher-e8b871ac72430c210e4750dcae8a119e8d757e20.tar.bz2 PrismLauncher-e8b871ac72430c210e4750dcae8a119e8d757e20.zip |
Merge branch 'PrismLauncher:develop' into version
Diffstat (limited to 'launcher/minecraft/mod/ResourceFolderModel.h')
-rw-r--r-- | launcher/minecraft/mod/ResourceFolderModel.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/minecraft/mod/ResourceFolderModel.h b/launcher/minecraft/mod/ResourceFolderModel.h index 25095a45..fe283b04 100644 --- a/launcher/minecraft/mod/ResourceFolderModel.h +++ b/launcher/minecraft/mod/ResourceFolderModel.h @@ -90,8 +90,8 @@ class ResourceFolderModel : public QAbstractListModel { /* Basic columns */ enum Columns { ACTIVE_COLUMN = 0, NAME_COLUMN, DATE_COLUMN, NUM_COLUMNS }; - [[nodiscard]] int rowCount(const QModelIndex& = {}) const override { return size(); } - [[nodiscard]] int columnCount(const QModelIndex& = {}) const override { return NUM_COLUMNS; }; + [[nodiscard]] int rowCount(const QModelIndex& parent = {}) const override { return parent.isValid() ? 0 : static_cast<int>(size()); } + [[nodiscard]] int columnCount(const QModelIndex& parent = {}) const override { return parent.isValid() ? 0 : NUM_COLUMNS; }; [[nodiscard]] Qt::DropActions supportedDropActions() const override; @@ -176,7 +176,7 @@ class ResourceFolderModel : public QAbstractListModel { * if the resource is complex and has more stuff to parse. */ virtual void onParseSucceeded(int ticket, QString resource_id); - virtual void onParseFailed(int ticket, QString resource_id) {} + virtual void onParseFailed(int ticket, QString resource_id) { Q_UNUSED(ticket); Q_UNUSED(resource_id); } protected: // Represents the relationship between a column's index (represented by the list index), and it's sorting key. |