MCPcopy Create free account
hub / github.com/TeXworks/texworks / findDocument

Method findDocument

src/PDFDocumentWindow.cpp:778–788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

776}
777
778PDFDocumentWindow *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
790void PDFDocumentWindow::showPage(size_type page)
791{

Callers

nothing calls this directly

Calls 1

foreachFunction · 0.70

Tested by

no test coverage detected