diff options
Diffstat (limited to 'src/pdf/qpdfsearchmodel.h')
-rw-r--r-- | src/pdf/qpdfsearchmodel.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pdf/qpdfsearchmodel.h b/src/pdf/qpdfsearchmodel.h index 70342d691..04f8b9140 100644 --- a/src/pdf/qpdfsearchmodel.h +++ b/src/pdf/qpdfsearchmodel.h @@ -19,6 +19,7 @@ class Q_PDF_EXPORT QPdfSearchModel : public QAbstractListModel Q_OBJECT Q_PROPERTY(QPdfDocument *document READ document WRITE setDocument NOTIFY documentChanged) Q_PROPERTY(QString searchString READ searchString WRITE setSearchString NOTIFY searchStringChanged) + Q_PROPERTY(int count READ count NOTIFY countChanged REVISION(6, 8) FINAL) public: enum class Role : int { @@ -27,7 +28,7 @@ public: Location, ContextBefore, ContextAfter, - _Count + NRoles }; Q_ENUM(Role) QPdfSearchModel() : QPdfSearchModel(nullptr) {} @@ -44,6 +45,8 @@ public: int rowCount(const QModelIndex &parent) const override; QVariant data(const QModelIndex &index, int role) const override; + int count() const; + public Q_SLOTS: void setSearchString(const QString &searchString); void setDocument(QPdfDocument *document); @@ -51,6 +54,7 @@ public Q_SLOTS: Q_SIGNALS: void documentChanged(); void searchStringChanged(); + Q_REVISION(6, 8) void countChanged(); protected: void updatePage(int page); |