diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-29 12:57:29 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-15 14:49:31 +0200 |
commit | 603a1809481eb4d4ca972f0f64915d29fb99f53b (patch) | |
tree | 09989c621f2db8a0dba0d9e05c421268e6d1552b /src/pdf | |
parent | 561d82242f67bb9b0520bfa04f05623f359171e2 (diff) |
Use QList instead of QVector
Task-number: QTBUG-84469
Change-Id: I666a060351f73783e15e3f96884c9393a5cd7e46
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/api/qpdflinkmodel_p_p.h | 2 | ||||
-rw-r--r-- | src/pdf/api/qpdfsearchmodel.h | 2 | ||||
-rw-r--r-- | src/pdf/api/qpdfsearchmodel_p.h | 4 | ||||
-rw-r--r-- | src/pdf/api/qpdfsearchresult.h | 8 | ||||
-rw-r--r-- | src/pdf/api/qpdfsearchresult_p.h | 4 | ||||
-rw-r--r-- | src/pdf/api/qpdfselection.h | 6 | ||||
-rw-r--r-- | src/pdf/api/qpdfselection_p.h | 6 | ||||
-rw-r--r-- | src/pdf/qpdfbookmarkmodel.cpp | 4 | ||||
-rw-r--r-- | src/pdf/qpdfdocument.cpp | 10 | ||||
-rw-r--r-- | src/pdf/qpdflinkmodel.cpp | 2 | ||||
-rw-r--r-- | src/pdf/qpdfpagerenderer.cpp | 4 | ||||
-rw-r--r-- | src/pdf/qpdfsearchmodel.cpp | 8 | ||||
-rw-r--r-- | src/pdf/qpdfsearchresult.cpp | 4 | ||||
-rw-r--r-- | src/pdf/qpdfselection.cpp | 4 | ||||
-rw-r--r-- | src/pdf/quick/qquickpdflinkmodel_p.h | 2 | ||||
-rw-r--r-- | src/pdf/quick/qquickpdfnavigationstack_p.h | 2 | ||||
-rw-r--r-- | src/pdf/quick/qquickpdfsearchmodel.cpp | 10 | ||||
-rw-r--r-- | src/pdf/quick/qquickpdfsearchmodel_p.h | 10 | ||||
-rw-r--r-- | src/pdf/quick/qquickpdfselection.cpp | 2 | ||||
-rw-r--r-- | src/pdf/quick/qquickpdfselection_p.h | 6 |
20 files changed, 50 insertions, 50 deletions
diff --git a/src/pdf/api/qpdflinkmodel_p_p.h b/src/pdf/api/qpdflinkmodel_p_p.h index 0454d6755..0606b4746 100644 --- a/src/pdf/api/qpdflinkmodel_p_p.h +++ b/src/pdf/api/qpdflinkmodel_p_p.h @@ -82,7 +82,7 @@ public: }; QPdfDocument *document = nullptr; - QVector<Link> links; + QList<Link> links; int page = 0; }; diff --git a/src/pdf/api/qpdfsearchmodel.h b/src/pdf/api/qpdfsearchmodel.h index eb0fb831f..1a413c763 100644 --- a/src/pdf/api/qpdfsearchmodel.h +++ b/src/pdf/api/qpdfsearchmodel.h @@ -66,7 +66,7 @@ public: explicit QPdfSearchModel(QObject *parent = nullptr); ~QPdfSearchModel(); - QVector<QPdfSearchResult> resultsOnPage(int page) const; + QList<QPdfSearchResult> resultsOnPage(int page) const; QPdfSearchResult resultAtIndex(int index) const; QPdfDocument *document() const; diff --git a/src/pdf/api/qpdfsearchmodel_p.h b/src/pdf/api/qpdfsearchmodel_p.h index 2a23706b2..551eff47c 100644 --- a/src/pdf/api/qpdfsearchmodel_p.h +++ b/src/pdf/api/qpdfsearchmodel_p.h @@ -74,8 +74,8 @@ public: QPdfDocument *document = nullptr; QString searchString; - QVector<bool> pagesSearched; - QVector<QVector<QPdfSearchResult>> searchResults; + QList<bool> pagesSearched; + QList<QList<QPdfSearchResult>> searchResults; int rowCountSoFar = 0; int updateTimerId = -1; int nextPageToUpdate = 0; diff --git a/src/pdf/api/qpdfsearchresult.h b/src/pdf/api/qpdfsearchresult.h index 2dfca2dc4..0acf03d52 100644 --- a/src/pdf/api/qpdfsearchresult.h +++ b/src/pdf/api/qpdfsearchresult.h @@ -38,8 +38,8 @@ #define QPDFSEARCHRESULT_H #include <QtCore/qdebug.h> +#include <QtCore/qlist.h> #include <QtCore/qrect.h> -#include <QtCore/qvector.h> #include <QtPdf/qpdfdestination.h> QT_BEGIN_NAMESPACE @@ -51,7 +51,7 @@ class Q_PDF_EXPORT QPdfSearchResult : public QPdfDestination Q_GADGET Q_PROPERTY(QString contextBefore READ contextBefore) Q_PROPERTY(QString contextAfter READ contextAfter) - Q_PROPERTY(QVector<QRectF> rectangles READ rectangles) + Q_PROPERTY(QList<QRectF> rectangles READ rectangles) public: QPdfSearchResult(); @@ -59,10 +59,10 @@ public: QString contextBefore() const; QString contextAfter() const; - QVector<QRectF> rectangles() const; + QList<QRectF> rectangles() const; private: - QPdfSearchResult(int page, QVector<QRectF> rects, QString contextBefore, QString contextAfter); + QPdfSearchResult(int page, QList<QRectF> rects, QString contextBefore, QString contextAfter); QPdfSearchResult(QPdfSearchResultPrivate *d); friend class QPdfDocument; friend class QPdfSearchModelPrivate; diff --git a/src/pdf/api/qpdfsearchresult_p.h b/src/pdf/api/qpdfsearchresult_p.h index 615dce4e0..eca37890e 100644 --- a/src/pdf/api/qpdfsearchresult_p.h +++ b/src/pdf/api/qpdfsearchresult_p.h @@ -56,7 +56,7 @@ class QPdfSearchResultPrivate : public QPdfDestinationPrivate { public: QPdfSearchResultPrivate() = default; - QPdfSearchResultPrivate(int page, QVector<QRectF> rects, QString contextBefore, QString contextAfter) : + QPdfSearchResultPrivate(int page, QList<QRectF> rects, QString contextBefore, QString contextAfter) : QPdfDestinationPrivate(page, rects.first().topLeft(), 0), contextBefore(contextBefore), contextAfter(contextAfter), @@ -64,7 +64,7 @@ public: QString contextBefore; QString contextAfter; - QVector<QRectF> rects; + QList<QRectF> rects; }; QT_END_NAMESPACE diff --git a/src/pdf/api/qpdfselection.h b/src/pdf/api/qpdfselection.h index 9d91d46c7..70077fdb0 100644 --- a/src/pdf/api/qpdfselection.h +++ b/src/pdf/api/qpdfselection.h @@ -52,7 +52,7 @@ class Q_PDF_EXPORT QPdfSelection { Q_GADGET Q_PROPERTY(bool valid READ isValid) - Q_PROPERTY(QVector<QPolygonF> bounds READ bounds) + Q_PROPERTY(QList<QPolygonF> bounds READ bounds) Q_PROPERTY(QRectF boundingRectangle READ boundingRectangle) Q_PROPERTY(QString text READ text) Q_PROPERTY(int startIndex READ startIndex) @@ -66,7 +66,7 @@ public: QPdfSelection &operator=(QPdfSelection &&other) noexcept { swap(other); return *this; } void swap(QPdfSelection &other) noexcept { d.swap(other.d); } bool isValid() const; - QVector<QPolygonF> bounds() const; + QList<QPolygonF> bounds() const; QString text() const; QRectF boundingRectangle() const; int startIndex() const; @@ -77,7 +77,7 @@ public: private: QPdfSelection(); - QPdfSelection(const QString &text, QVector<QPolygonF> bounds, QRectF boundingRect, int startIndex, int endIndex); + QPdfSelection(const QString &text, QList<QPolygonF> bounds, QRectF boundingRect, int startIndex, int endIndex); QPdfSelection(QPdfSelectionPrivate *d); friend class QPdfDocument; friend class QQuickPdfSelection; diff --git a/src/pdf/api/qpdfselection_p.h b/src/pdf/api/qpdfselection_p.h index 0577e5a31..37ca3a3ce 100644 --- a/src/pdf/api/qpdfselection_p.h +++ b/src/pdf/api/qpdfselection_p.h @@ -37,8 +37,8 @@ #ifndef QPDFSELECTION_P_H #define QPDFSELECTION_P_H +#include <QList> #include <QPolygonF> -#include <QVector> QT_BEGIN_NAMESPACE @@ -46,7 +46,7 @@ class QPdfSelectionPrivate : public QSharedData { public: QPdfSelectionPrivate() = default; - QPdfSelectionPrivate(const QString &text, QVector<QPolygonF> bounds, QRectF boundingRect, int startIndex, int endIndex) + QPdfSelectionPrivate(const QString &text, QList<QPolygonF> bounds, QRectF boundingRect, int startIndex, int endIndex) : text(text), bounds(bounds), boundingRect(boundingRect), @@ -54,7 +54,7 @@ public: endIndex(endIndex) { } QString text; - QVector<QPolygonF> bounds; + QList<QPolygonF> bounds; QRectF boundingRect; int startIndex; int endIndex; diff --git a/src/pdf/qpdfbookmarkmodel.cpp b/src/pdf/qpdfbookmarkmodel.cpp index c9c365568..eb4cb8773 100644 --- a/src/pdf/qpdfbookmarkmodel.cpp +++ b/src/pdf/qpdfbookmarkmodel.cpp @@ -128,7 +128,7 @@ public: } private: - QVector<BookmarkNode*> m_childNodes; + QList<BookmarkNode*> m_childNodes; BookmarkNode *m_parentNode; QString m_title; @@ -189,7 +189,7 @@ public: const int titleLength = int(FPDFBookmark_GetTitle(bookmark, nullptr, 0)); - QVector<ushort> titleBuffer(titleLength); + QList<ushort> titleBuffer(titleLength); FPDFBookmark_GetTitle(bookmark, titleBuffer.data(), quint32(titleBuffer.length())); const FPDF_DEST dest = FPDFBookmark_GetDest(document, bookmark); diff --git a/src/pdf/qpdfdocument.cpp b/src/pdf/qpdfdocument.cpp index e5d981c0a..9b83e9b8e 100644 --- a/src/pdf/qpdfdocument.cpp +++ b/src/pdf/qpdfdocument.cpp @@ -401,7 +401,7 @@ void QPdfDocumentPrivate::fpdf_AddSegment(_FX_DOWNLOADHINTS *pThis, size_t offse QString QPdfDocumentPrivate::getText(FPDF_TEXTPAGE textPage, int startIndex, int count) { - QVector<ushort> buf(count + 1); + QList<ushort> buf(count + 1); // TODO is that enough space in case one unicode character is more than one in utf-16? int len = FPDFText_GetText(textPage, startIndex, count, buf.data()); Q_ASSERT(len - 1 <= count); // len is number of characters written, including the terminator @@ -602,7 +602,7 @@ QVariant QPdfDocument::metaData(MetaDataField field) const QPdfMutexLocker lock; const unsigned long len = FPDF_GetMetaText(d->doc, fieldName.constData(), nullptr, 0); - QVector<ushort> buf(len); + QList<ushort> buf(len); FPDF_GetMetaText(d->doc, fieldName.constData(), buf.data(), buf.length()); lock.unlock(); @@ -807,7 +807,7 @@ QPdfSelection QPdfDocument::getSelection(int page, QPointF start, QPointF end) int count = endIndex - startIndex; QString text = d->getText(textPage, startIndex, count); - QVector<QPolygonF> bounds; + QList<QPolygonF> bounds; QRectF hull; int rectCount = FPDFText_CountRects(textPage, startIndex, endIndex - startIndex); for (int i = 0; i < rectCount; ++i) { @@ -844,7 +844,7 @@ QPdfSelection QPdfDocument::getSelectionAtIndex(int page, int startIndex, int ma int pageCount = FPDFText_CountChars(textPage); if (startIndex >= pageCount) return QPdfSelection(); - QVector<QPolygonF> bounds; + QList<QPolygonF> bounds; QRectF hull; int rectCount = 0; QString text; @@ -882,7 +882,7 @@ QPdfSelection QPdfDocument::getAllText(int page) if (count < 1) return QPdfSelection(); QString text = d->getText(textPage, 0, count); - QVector<QPolygonF> bounds; + QList<QPolygonF> bounds; QRectF hull; int rectCount = FPDFText_CountRects(textPage, 0, count); for (int i = 0; i < rectCount; ++i) { diff --git a/src/pdf/qpdflinkmodel.cpp b/src/pdf/qpdflinkmodel.cpp index 68ae7bc6d..2738aa533 100644 --- a/src/pdf/qpdflinkmodel.cpp +++ b/src/pdf/qpdflinkmodel.cpp @@ -239,7 +239,7 @@ void QPdfLinkModelPrivate::update() if (len < 1) { qCWarning(qLcLink) << "skipping link" << i << "with empty URL"; } else { - QVector<unsigned short> buf(len); + QList<unsigned short> buf(len); int got = FPDFLink_GetURL(webLinks, i, buf.data(), len); Q_ASSERT(got == len); linkData.url = QString::fromUtf16(buf.data(), got - 1); diff --git a/src/pdf/qpdfpagerenderer.cpp b/src/pdf/qpdfpagerenderer.cpp index 460e95bed..cbff0ea8f 100644 --- a/src/pdf/qpdfpagerenderer.cpp +++ b/src/pdf/qpdfpagerenderer.cpp @@ -89,8 +89,8 @@ public: QPdfDocumentRenderOptions options; }; - QVector<PageRequest> m_requests; - QVector<PageRequest> m_pendingRequests; + QList<PageRequest> m_requests; + QList<PageRequest> m_pendingRequests; quint64 m_requestIdCounter = 1; QThread *m_renderThread = nullptr; diff --git a/src/pdf/qpdfsearchmodel.cpp b/src/pdf/qpdfsearchmodel.cpp index f87c1494f..eeb0a18ce 100644 --- a/src/pdf/qpdfsearchmodel.cpp +++ b/src/pdf/qpdfsearchmodel.cpp @@ -136,7 +136,7 @@ void QPdfSearchModel::setSearchString(QString searchString) endResetModel(); } -QVector<QPdfSearchResult> QPdfSearchModel::resultsOnPage(int page) const +QList<QPdfSearchResult> QPdfSearchModel::resultsOnPage(int page) const { Q_D(const QPdfSearchModel); const_cast<QPdfSearchModelPrivate *>(d)->doSearch(page); @@ -230,12 +230,12 @@ bool QPdfSearchModelPrivate::doSearch(int page) return false; } FPDF_SCHHANDLE sh = FPDFText_FindStart(textPage, searchString.utf16(), 0, 0); - QVector<QPdfSearchResult> newSearchResults; + QList<QPdfSearchResult> newSearchResults; while (FPDFText_FindNext(sh)) { int idx = FPDFText_GetSchResultIndex(sh); int count = FPDFText_GetSchCount(sh); int rectCount = FPDFText_CountRects(textPage, idx, count); - QVector<QRectF> rects; + QList<QRectF> rects; int startIndex = -1; int endIndex = -1; for (int r = 0; r < rectCount; ++r) { @@ -258,7 +258,7 @@ bool QPdfSearchModelPrivate::doSearch(int page) endIndex += ContextChars; int count = endIndex - startIndex + 1; if (count > 0) { - QVector<ushort> buf(count + 1); + QList<ushort> buf(count + 1); int len = FPDFText_GetText(textPage, startIndex, count, buf.data()); Q_ASSERT(len - 1 <= count); // len is number of characters written, including the terminator QString context = QString::fromUtf16(buf.constData(), len - 1); diff --git a/src/pdf/qpdfsearchresult.cpp b/src/pdf/qpdfsearchresult.cpp index 53da1c165..629a8765f 100644 --- a/src/pdf/qpdfsearchresult.cpp +++ b/src/pdf/qpdfsearchresult.cpp @@ -42,7 +42,7 @@ QT_BEGIN_NAMESPACE QPdfSearchResult::QPdfSearchResult() : QPdfSearchResult(new QPdfSearchResultPrivate()) { } -QPdfSearchResult::QPdfSearchResult(int page, QVector<QRectF> rects, QString contextBefore, QString contextAfter) : +QPdfSearchResult::QPdfSearchResult(int page, QList<QRectF> rects, QString contextBefore, QString contextAfter) : QPdfSearchResult(new QPdfSearchResultPrivate(page, rects, contextBefore, contextAfter)) { } QPdfSearchResult::QPdfSearchResult(QPdfSearchResultPrivate *d) : @@ -58,7 +58,7 @@ QString QPdfSearchResult::contextAfter() const return static_cast<QPdfSearchResultPrivate *>(d.data())->contextAfter; } -QVector<QRectF> QPdfSearchResult::rectangles() const +QList<QRectF> QPdfSearchResult::rectangles() const { return static_cast<QPdfSearchResultPrivate *>(d.data())->rects; } diff --git a/src/pdf/qpdfselection.cpp b/src/pdf/qpdfselection.cpp index 5f0ee3b20..b8ad02969 100644 --- a/src/pdf/qpdfselection.cpp +++ b/src/pdf/qpdfselection.cpp @@ -67,7 +67,7 @@ QPdfSelection::QPdfSelection() \a text string, and which take up space on the page within the polygon regions given in \a bounds. */ -QPdfSelection::QPdfSelection(const QString &text, QVector<QPolygonF> bounds, QRectF boundingRect, int startIndex, int endIndex) +QPdfSelection::QPdfSelection(const QString &text, QList<QPolygonF> bounds, QRectF boundingRect, int startIndex, int endIndex) : d(new QPdfSelectionPrivate(text, bounds, boundingRect, startIndex, endIndex)) { } @@ -119,7 +119,7 @@ bool QPdfSelection::isValid() const are always rectangles; but in the future it may be possible to represent more complex regions. */ -QVector<QPolygonF> QPdfSelection::bounds() const +QList<QPolygonF> QPdfSelection::bounds() const { return d->bounds; } diff --git a/src/pdf/quick/qquickpdflinkmodel_p.h b/src/pdf/quick/qquickpdflinkmodel_p.h index 23ad6c8c1..6f19daa28 100644 --- a/src/pdf/quick/qquickpdflinkmodel_p.h +++ b/src/pdf/quick/qquickpdflinkmodel_p.h @@ -75,7 +75,7 @@ private: private: QQuickPdfDocument *m_quickDocument; - QVector<QPolygonF> m_linksGeometry; + QList<QPolygonF> m_linksGeometry; Q_DISABLE_COPY(QQuickPdfLinkModel) }; diff --git a/src/pdf/quick/qquickpdfnavigationstack_p.h b/src/pdf/quick/qquickpdfnavigationstack_p.h index 0d88d62fd..5df00add5 100644 --- a/src/pdf/quick/qquickpdfnavigationstack_p.h +++ b/src/pdf/quick/qquickpdfnavigationstack_p.h @@ -88,7 +88,7 @@ Q_SIGNALS: void jumped(int page, QPointF location, qreal zoom); private: - QVector<QExplicitlySharedDataPointer<QPdfDestinationPrivate>> m_pageHistory; + QList<QExplicitlySharedDataPointer<QPdfDestinationPrivate>> m_pageHistory; int m_currentHistoryIndex = 0; bool m_changing = false; diff --git a/src/pdf/quick/qquickpdfsearchmodel.cpp b/src/pdf/quick/qquickpdfsearchmodel.cpp index 1f62fbad0..a39178ba3 100644 --- a/src/pdf/quick/qquickpdfsearchmodel.cpp +++ b/src/pdf/quick/qquickpdfsearchmodel.cpp @@ -104,9 +104,9 @@ void QQuickPdfSearchModel::setDocument(QQuickPdfDocument *document) \sa PathMultiline */ -QVector<QPolygonF> QQuickPdfSearchModel::currentResultBoundingPolygons() const +QList<QPolygonF> QQuickPdfSearchModel::currentResultBoundingPolygons() const { - QVector<QPolygonF> ret; + QList<QPolygonF> ret; const auto &results = const_cast<QQuickPdfSearchModel *>(this)->resultsOnPage(m_currentPage); if (m_currentResult < 0 || m_currentResult >= results.count()) return ret; @@ -172,7 +172,7 @@ void QQuickPdfSearchModel::onResultsChanged() \sa PathMultiline */ -QVector<QPolygonF> QQuickPdfSearchModel::currentPageBoundingPolygons() const +QList<QPolygonF> QQuickPdfSearchModel::currentPageBoundingPolygons() const { return const_cast<QQuickPdfSearchModel *>(this)->boundingPolygonsOnPage(m_currentPage); } @@ -203,14 +203,14 @@ QVector<QPolygonF> QQuickPdfSearchModel::currentPageBoundingPolygons() const \sa PathMultiline */ -QVector<QPolygonF> QQuickPdfSearchModel::boundingPolygonsOnPage(int page) +QList<QPolygonF> QQuickPdfSearchModel::boundingPolygonsOnPage(int page) { if (!document() || searchString().isEmpty() || page < 0 || page > document()->pageCount()) return {}; updatePage(page); - QVector<QPolygonF> ret; + QList<QPolygonF> ret; auto m = QPdfSearchModel::resultsOnPage(page); for (auto result : m) { for (auto rect : result.rectangles()) diff --git a/src/pdf/quick/qquickpdfsearchmodel_p.h b/src/pdf/quick/qquickpdfsearchmodel_p.h index 66fc583d9..3f0f6f4c1 100644 --- a/src/pdf/quick/qquickpdfsearchmodel_p.h +++ b/src/pdf/quick/qquickpdfsearchmodel_p.h @@ -62,8 +62,8 @@ class QQuickPdfSearchModel : public QPdfSearchModel Q_PROPERTY(QQuickPdfDocument *document READ document WRITE setDocument NOTIFY documentChanged) Q_PROPERTY(int currentPage READ currentPage WRITE setCurrentPage NOTIFY currentPageChanged) Q_PROPERTY(int currentResult READ currentResult WRITE setCurrentResult NOTIFY currentResultChanged) - Q_PROPERTY(QVector<QPolygonF> currentPageBoundingPolygons READ currentPageBoundingPolygons NOTIFY currentPageBoundingPolygonsChanged) - Q_PROPERTY(QVector<QPolygonF> currentResultBoundingPolygons READ currentResultBoundingPolygons NOTIFY currentResultBoundingPolygonsChanged) + Q_PROPERTY(QList<QPolygonF> currentPageBoundingPolygons READ currentPageBoundingPolygons NOTIFY currentPageBoundingPolygonsChanged) + Q_PROPERTY(QList<QPolygonF> currentResultBoundingPolygons READ currentResultBoundingPolygons NOTIFY currentResultBoundingPolygonsChanged) Q_PROPERTY(QRectF currentResultBoundingRect READ currentResultBoundingRect NOTIFY currentResultBoundingRectChanged) public: @@ -72,7 +72,7 @@ public: QQuickPdfDocument *document() const; void setDocument(QQuickPdfDocument * document); - Q_INVOKABLE QVector<QPolygonF> boundingPolygonsOnPage(int page); + Q_INVOKABLE QList<QPolygonF> boundingPolygonsOnPage(int page); int currentPage() const { return m_currentPage; } void setCurrentPage(int currentPage); @@ -80,8 +80,8 @@ public: int currentResult() const { return m_currentResult; } void setCurrentResult(int currentResult); - QVector<QPolygonF> currentPageBoundingPolygons() const; - QVector<QPolygonF> currentResultBoundingPolygons() const; + QList<QPolygonF> currentPageBoundingPolygons() const; + QList<QPolygonF> currentResultBoundingPolygons() const; QRectF currentResultBoundingRect() const; signals: diff --git a/src/pdf/quick/qquickpdfselection.cpp b/src/pdf/quick/qquickpdfselection.cpp index 23fbb80b9..bdedb4dfb 100644 --- a/src/pdf/quick/qquickpdfselection.cpp +++ b/src/pdf/quick/qquickpdfselection.cpp @@ -141,7 +141,7 @@ void QQuickPdfSelection::setDocument(QQuickPdfDocument *document) \sa PathMultiline */ -QVector<QPolygonF> QQuickPdfSelection::geometry() const +QList<QPolygonF> QQuickPdfSelection::geometry() const { return m_geometry; } diff --git a/src/pdf/quick/qquickpdfselection_p.h b/src/pdf/quick/qquickpdfselection_p.h index ee7e1f85f..75631a876 100644 --- a/src/pdf/quick/qquickpdfselection_p.h +++ b/src/pdf/quick/qquickpdfselection_p.h @@ -70,7 +70,7 @@ class QQuickPdfSelection : public QQuickItem Q_PROPERTY(bool hold READ hold WRITE setHold NOTIFY holdChanged) Q_PROPERTY(QString text READ text NOTIFY textChanged) - Q_PROPERTY(QVector<QPolygonF> geometry READ geometry NOTIFY selectedAreaChanged) + Q_PROPERTY(QList<QPolygonF> geometry READ geometry NOTIFY selectedAreaChanged) public: explicit QQuickPdfSelection(QQuickItem *parent = nullptr); @@ -89,7 +89,7 @@ public: void setHold(bool hold); QString text() const; - QVector<QPolygonF> geometry() const; + QList<QPolygonF> geometry() const; Q_INVOKABLE void clear(); Q_INVOKABLE void selectAll(); @@ -131,7 +131,7 @@ private: mutable qreal m_heightAtCursor = 0; QString m_text; // selected text mutable QString m_pageText; // all text on the page - QVector<QPolygonF> m_geometry; + QList<QPolygonF> m_geometry; int m_page = 0; int m_fromCharIndex = -1; // same as anchor position mutable int m_toCharIndex = -1; // same as cursor position |