diff options
author | Mikolaj Boc <mikolaj.boc@qt.io> | 2023-04-12 18:32:35 +0200 |
---|---|---|
committer | Mikolaj Boc <mikolaj.boc@qt.io> | 2023-04-17 15:09:56 +0200 |
commit | d1347ebbe99b467799680bb6e3cee81932751df5 (patch) | |
tree | a2511878f488a12da57b5311dc6d53ceb14a1990 /src/pdf/qpdfsearchmodel_p.h | |
parent | 2c80ff478bcc3290cafd970c5fd3412f2887fc91 (diff) |
Clear PDF search results on document page model change
Not clearing the search results leads to crashes when the incoming
page model is larger than the outgoing model, due to internal
state being still in sync with the old document, but the page count
of the new document being used.
Fixes: QTBUG-111067
Pick-to: 6.5
Change-Id: Ic81744ebe0cb7d1a152453721abd7d1b5c5fa2b9
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/pdf/qpdfsearchmodel_p.h')
-rw-r--r-- | src/pdf/qpdfsearchmodel_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pdf/qpdfsearchmodel_p.h b/src/pdf/qpdfsearchmodel_p.h index 4922c81e9..5ffa08f5d 100644 --- a/src/pdf/qpdfsearchmodel_p.h +++ b/src/pdf/qpdfsearchmodel_p.h @@ -45,6 +45,8 @@ public: int rowCountSoFar = 0; int updateTimerId = -1; int nextPageToUpdate = 0; + + QMetaObject::Connection documentConnection; }; QT_END_NAMESPACE |