From 4c4825a2a8aa33297d591150cf26cfd3119cbba7 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Sun, 11 May 2014 16:31:07 +0200 Subject: [PATCH] Print preview: explicitly look for the Okular/Ghostview part No other parts which renders PostScript are available at the moment, and parts which handles them are return "unexpected" resultS (e.g. katepart: PostScript source code). Reviewed by: Albert Astal Cid BUG: 284428 FIXED-IN: 4.13.2 --- ui/fileprinterpreview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/fileprinterpreview.cpp b/ui/fileprinterpreview.cpp index 85fa32aeb..47035d63e 100644 --- a/ui/fileprinterpreview.cpp +++ b/ui/fileprinterpreview.cpp @@ -69,8 +69,12 @@ void FilePrinterPreviewPrivate::getPart() kDebug(500) << "querying trader for application/ps service"; KPluginFactory *factory(0); + /* Explicitly look for the Okular/Ghostview part: no other PostScript + parts are available now; other parts which handles text are not + suitable here (PostScript source code) */ KService::List offers = - KMimeTypeTrader::self()->query("application/postscript", "KParts/ReadOnlyPart"); + KMimeTypeTrader::self()->query("application/postscript", "KParts/ReadOnlyPart", + "[DesktopEntryName] == 'okularghostview'"); KService::List::ConstIterator it = offers.constBegin(); while (!factory && it != offers.constEnd()) {