mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-13 03:12:22 +00:00
Finish off the previous commit (sorry 'bout that): set setUseShell if quoting args.
svn path=/trunk/KDE/kdegraphics/kviewshell/plugins/dvi/; revision=488807
This commit is contained in:
parent
24fbb04410
commit
716a4440ae
|
@ -744,7 +744,8 @@ void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, Documen
|
|||
}
|
||||
|
||||
// Set up a shell process with the editor command.
|
||||
proc = new KProcess();
|
||||
proc = new KProcess;
|
||||
|
||||
if (proc == 0) {
|
||||
kdError(kvs::dvi) << "Could not allocate ShellProcess for the editor command." << endl;
|
||||
return;
|
||||
|
@ -766,6 +767,7 @@ void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, Documen
|
|||
|
||||
|
||||
proc->clearArguments();
|
||||
proc->setUseShell(true, getenv("SHELL"));
|
||||
*proc << command;
|
||||
proc->closeStdin();
|
||||
if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) {
|
||||
|
|
|
@ -120,7 +120,7 @@ void dviRenderer::exportPDF()
|
|||
qApp->connect(progress, SIGNAL(finished()), this, SLOT(abortExternalProgramm()));
|
||||
}
|
||||
|
||||
proc = new KProcess();
|
||||
proc = new KProcess;
|
||||
if (proc == 0) {
|
||||
kdError(kvs::dvi) << "Could not allocate ShellProcess for the dvipdfm command." << endl;
|
||||
return;
|
||||
|
@ -137,6 +137,8 @@ void dviRenderer::exportPDF()
|
|||
info->clear(i18n("Export: %1 to PDF").arg(KProcess::quote(dviFile->filename)));
|
||||
|
||||
proc->clearArguments();
|
||||
proc->setUseShell(true, getenv("SHELL"));
|
||||
|
||||
finfo.setFile(dviFile->filename);
|
||||
*proc << QString("cd %1; dvipdfm").arg(KProcess::quote(finfo.dirPath(true)));
|
||||
*proc << QString("-o %1").arg(KProcess::quote(fileName));
|
||||
|
@ -286,7 +288,7 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
|
|||
}
|
||||
|
||||
// Allocate and initialize the shell process.
|
||||
proc = new KProcess();
|
||||
proc = new KProcess;
|
||||
if (proc == 0) {
|
||||
kdError(kvs::dvi) << "Could not allocate ShellProcess for the dvips command." << endl;
|
||||
return;
|
||||
|
@ -301,6 +303,8 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
|
|||
info->clear(i18n("Export: %1 to PostScript").arg(KProcess::quote(dviFile->filename)));
|
||||
|
||||
proc->clearArguments();
|
||||
proc->setUseShell(true, getenv("SHELL"));
|
||||
|
||||
QFileInfo finfo(dviFile->filename);
|
||||
*proc << QString("cd %1; dvips").arg(KProcess::quote(finfo.dirPath(true)));
|
||||
if (printer == 0)
|
||||
|
|
Loading…
Reference in a new issue