From 31373189769fd54b0be940152f462175515c9fea Mon Sep 17 00:00:00 2001 From: Digital Artifex <7929434+DigitalArtifex@users.noreply.github.com> Date: Tue, 16 Jun 2026 21:55:43 -0400 Subject: [PATCH] Fixed typo in function name --- KomplexHubPlugin/newestpacksmodel.cpp | 4 +-- KomplexHubPlugin/newestpacksmodel.h | 50 ++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/KomplexHubPlugin/newestpacksmodel.cpp b/KomplexHubPlugin/newestpacksmodel.cpp index 02db1d7..b05ea32 100644 --- a/KomplexHubPlugin/newestpacksmodel.cpp +++ b/KomplexHubPlugin/newestpacksmodel.cpp @@ -38,7 +38,7 @@ NewestPacksModel::NewestPacksModel(QObject *parent) : QAbstractListModel{parent} notifier, &PaginationNotifier::dataChanged, this, - &NewestPacksModel::restDataModel + &NewestPacksModel::resetDataModel ); } @@ -149,7 +149,7 @@ auto NewestPacksModel::resetState() -> void setState(Idle); } -auto NewestPacksModel::restDataModel() -> void +auto NewestPacksModel::resetDataModel() -> void { //invalidate previous model data beginRemoveRows(QModelIndex(), 0, m_data.count()); diff --git a/KomplexHubPlugin/newestpacksmodel.h b/KomplexHubPlugin/newestpacksmodel.h index dfd6d06..d99b67b 100644 --- a/KomplexHubPlugin/newestpacksmodel.h +++ b/KomplexHubPlugin/newestpacksmodel.h @@ -78,6 +78,12 @@ public: explicit NewestPacksModel(QObject *parent = nullptr); + /** + * @brief rowCount + * @param parent + * @return + */ + [[nodiscard]] auto rowCount(const QModelIndex &parent = QModelIndex()) const -> int override; /** @@ -88,6 +94,7 @@ public: * @param role * @return */ + [[nodiscard]] auto data( const QModelIndex &index, int role = Qt::DisplayRole @@ -102,6 +109,7 @@ public: * @param parent * @return */ + [[nodiscard]] auto index( int row, int column, @@ -115,6 +123,7 @@ public: * @param parent * @return */ + [[nodiscard]] auto columnCount( const QModelIndex &parent = QModelIndex() ) const -> int override; @@ -124,6 +133,7 @@ public: * @param index * @return */ + [[nodiscard]] auto parent(const QModelIndex &index) const -> QModelIndex override; /** @@ -153,19 +163,54 @@ public: * and their QML friendly names * @return */ + [[nodiscard]] auto roleNames() const -> QHash override; + /** + * @brief errorString + * @return + */ + [[nodiscard]] auto errorString() const -> QString; + /** + * @brief resultsPerPage + * @return + */ auto resultsPerPage() const -> qsizetype; + + /** + * @brief setResultsPerPage + * @param resultsPerPage + */ auto setResultsPerPage(qsizetype resultsPerPage) -> void; + /** + * @brief totalResults + * @return + */ auto totalResults() const -> qsizetype; + /** + * @brief page + * @return + */ auto page() const -> qsizetype; + + /** + * @brief totalPages + * @return + */ auto totalPages() const -> qsizetype; + /** + * @brief nextPage + */ Q_INVOKABLE auto nextPage() const -> void; + + /** + * @brief previousPage + */ Q_INVOKABLE auto previousPage() const -> void; protected: @@ -186,7 +231,10 @@ protected: */ auto resetState() -> void; - auto restDataModel() -> void; + /** + * @brief resetDataModel + */ + auto resetDataModel() -> void; signals: auto stateChanged() -> void;