summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2016-11-21 08:56:51 +0100
committerAndy Shaw <andy.shaw@qt.io>2018-01-16 09:30:08 +0000
commit11ba0616668a40b077a5b8e50429e274a4b297fd (patch)
treedd0e6b15877f06ade11a8c3b69551f03b5024a62
parent58f0987e16ac4580d9e4a6b604dd7603510b0385 (diff)
downloadqttools-11ba0616668a40b077a5b8e50429e274a4b297fd.tar.gz
Open PDF files externally instead of inside Assistant
Since Qt Assistant no longer uses Qt WebKit then we need to open the PDF files externally to ensure that they are shown. Change-Id: If659c15524e106c9974ead144afe2048452a4c22 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/assistant/assistant/helpviewer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/assistant/assistant/helpviewer.cpp b/src/assistant/assistant/helpviewer.cpp
index 2ea72270b..8c97f463f 100644
--- a/src/assistant/assistant/helpviewer.cpp
+++ b/src/assistant/assistant/helpviewer.cpp
@@ -72,7 +72,7 @@ struct ExtensionMap {
{ ".mng", "video/x-mng" },
{ ".pbm", "image/x-portable-bitmap" },
{ ".pgm", "image/x-portable-graymap" },
- { ".pdf", "application/pdf" },
+ { ".pdf", 0 },
{ ".png", "image/png" },
{ ".ppm", "image/x-portable-pixmap" },
{ ".rss", "application/rss+xml" },
@@ -156,7 +156,7 @@ bool HelpViewer::launchWithExternalApp(const QUrl &url)
actualTmpFile.write(helpEngine.fileData(resolvedUrl));
actualTmpFile.close();
- return QDesktopServices::openUrl(QUrl(actualTmpFile.fileName()));
+ return QDesktopServices::openUrl(QUrl::fromLocalFile(actualTmpFile.fileName()));
}
return false;
}