From e604e580c5ddbc571118fc90c84683fd4af1cacf Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 2 Aug 2009 18:52:42 +0000 Subject: [PATCH] make the gs kprocess collecct its output; disable an error message box (not doable in threads) will be in kde 4.3.1 CCBUG: 192405 svn path=/branches/KDE/4.3/kdegraphics/okular/; revision=1005983 --- generators/dvi/psgs.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/generators/dvi/psgs.cpp b/generators/dvi/psgs.cpp index c6d5fd019..e903b5952 100644 --- a/generators/dvi/psgs.cpp +++ b/generators/dvi/psgs.cpp @@ -215,6 +215,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co // Step 2: Call GS with the File QFile::remove(filename.toAscii()); KProcess proc; + proc.setOutputChannelMode(KProcess::SeparateChannels); QStringList argus; argus << "gs"; argus << "-dSAFER" << "-dPARANOIDSAFER" << "-dDELAYSAFER" << "-dNOPAUSE" << "-dBATCH"; @@ -259,6 +260,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co gsDevice = knownDevices.begin(); if (knownDevices.isEmpty()) // TODO: show a requestor of some sort. +#if 0 KMessageBox::detailedError(0, i18n("The version of Ghostview that is installed on this computer does not contain " "any of the Ghostview device drivers that are known to Okular. PostScript " @@ -279,6 +281,9 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co "Ghostview. Among others, Okular can use the 'png256', 'jpeg' and 'pnm' " "drivers. Note that Okular needs to be restarted to re-enable PostScript support." "

")); +#else + {} +#endif else { kDebug(kvs::dvi) << QString("Okular will now try to use the '%1' device driver.").arg(*gsDevice); gs_generate_graphics_file(page, filename, magnification);