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
remotes/origin/KDE/4.3
Pino Toscano 17 years ago
parent 574c45e268
commit e604e580c5
  1. 5
      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("<qt>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."
"</p></qt>"));
#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);

Loading…
Cancel
Save