aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ResourceFolderModel.h
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/mod/ResourceFolderModel.h
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/mod/ResourceFolderModel.h')
-rw-r--r--launcher/minecraft/mod/ResourceFolderModel.h6
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.