MCPcopy Create free account
hub / github.com/KDE/okular / doPreview

Method doPreview

part/fileprinterpreview.cpp:91–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91bool FilePrinterPreviewPrivate::doPreview()
92{
93 if (!QFile::exists(filename)) {
94 qCWarning(OkularUiDebug) << "Nothing was produced to be previewed";
95 return false;
96 }
97
98 getPart();
99 if (!previewPart) {
100 // TODO: error dialog
101 qCWarning(OkularUiDebug) << "Could not find a PS viewer for the preview dialog";
102 fail();
103 return false;
104 } else {
105 mainlayout->insertWidget(0, previewPart->widget());
106 return previewPart->openUrl(QUrl::fromLocalFile(filename));
107 }
108}
109
110void FilePrinterPreviewPrivate::fail()
111{

Callers 1

showEventMethod · 0.80

Calls 1

openUrlMethod · 0.45

Tested by

no test coverage detected