| 776 | } |
| 777 | |
| 778 | PDFDocumentWindow *PDFDocumentWindow::findDocument(const QString &fileName) |
| 779 | { |
| 780 | QString canonicalFilePath = QFileInfo(fileName).canonicalFilePath(); |
| 781 | |
| 782 | foreach (QWidget *widget, qApp->topLevelWidgets()) { |
| 783 | PDFDocumentWindow *theDoc = qobject_cast<PDFDocumentWindow*>(widget); |
| 784 | if (theDoc && theDoc->curFile == canonicalFilePath) |
| 785 | return theDoc; |
| 786 | } |
| 787 | return nullptr; |
| 788 | } |
| 789 | |
| 790 | void PDFDocumentWindow::showPage(size_type page) |
| 791 | { |