summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2023-08-28 12:34:24 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-08-30 21:20:46 +0000
commit29b1fc140b02a5c528772da1af05569de57abf45 (patch)
treea90c77a94bc14df8a5926b9fc5e92d60458fb4bd
parent720b3a27b582dfa7aab8e8d7b1999292cd458396 (diff)
QPdfSearchModel: remove onDocumentPageCountChanged()
This function was introduced in d1347ebbe99b467799680bb6e3cee81932751df5 as a bugfix for QTBUG-111067. The patch was also picked to 6.5, which is not really correct, because we normally guarantee forward BC in patch releases. Generally, there is no reason to expose this method to the API - we could just use a lambda internally. Do it now. Treat the exposed function as internal, and remove it completely both from the API and the ABI. Change-Id: I48b93767c341aca58135872f391fc731561b68d4 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 46531f2cae2d08b9c7e192ac5f657d0a7ad9996c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/pdf/qpdfsearchmodel.cpp10
-rw-r--r--src/pdf/qpdfsearchmodel.h1
2 files changed, 1 insertions, 10 deletions
diff --git a/src/pdf/qpdfsearchmodel.cpp b/src/pdf/qpdfsearchmodel.cpp
index 3109430f0..90be76b8e 100644
--- a/src/pdf/qpdfsearchmodel.cpp
+++ b/src/pdf/qpdfsearchmodel.cpp
@@ -196,21 +196,13 @@ void QPdfSearchModel::setDocument(QPdfDocument *document)
disconnect(d->documentConnection);
d->documentConnection = connect(document, &QPdfDocument::pageCountChanged, this,
- &QPdfSearchModel::onDocumentPageCountChanged);
+ [this]() { d_func()->clearResults(); });
d->document = document;
d->clearResults();
emit documentChanged();
}
-void QPdfSearchModel::onDocumentPageCountChanged(int count)
-{
- Q_UNUSED(count);
-
- Q_D(QPdfSearchModel);
- d->clearResults();
-}
-
void QPdfSearchModel::timerEvent(QTimerEvent *event)
{
Q_D(QPdfSearchModel);
diff --git a/src/pdf/qpdfsearchmodel.h b/src/pdf/qpdfsearchmodel.h
index b1094b67b..c1e4e64ec 100644
--- a/src/pdf/qpdfsearchmodel.h
+++ b/src/pdf/qpdfsearchmodel.h
@@ -55,7 +55,6 @@ Q_SIGNALS:
protected:
void updatePage(int page);
void timerEvent(QTimerEvent *event) override;
- void onDocumentPageCountChanged(int count);
private:
QHash<int, QByteArray> m_roleNames;