| 199 | } |
| 200 | |
| 201 | PDFDocumentScene::size_type PDFDocumentScene::pageNumFor(const PDFPageGraphicsItem * const graphicsItem) const |
| 202 | { |
| 203 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
| 204 | // Note: since we store QGraphicsItem* in _pages, we need to remove the const |
| 205 | // or else indexOf() complains during compilation. Since we don't do anything |
| 206 | // with the pointer, this should be safe to do while still remaining the |
| 207 | // const'ness of `graphicsItem`, however. |
| 208 | return _pages.indexOf(const_cast<PDFPageGraphicsItem *>(graphicsItem)); |
| 209 | #else |
| 210 | return _pages.indexOf(graphicsItem); |
| 211 | #endif |
| 212 | } |
| 213 | |
| 214 | PDFDocumentScene::size_type PDFDocumentScene::lastPage() { return _lastPage; } |
| 215 |
no outgoing calls
no test coverage detected