s/KShellProcess/KProcess/

svn path=/trunk/KDE/kdegraphics/kviewshell/plugins/dvi/; revision=488799
This commit is contained in:
Angus Leeming 2005-12-15 22:44:42 +00:00
parent ef88281c04
commit 24fbb04410
3 changed files with 15 additions and 16 deletions

View file

@ -706,7 +706,7 @@ void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, Documen
{
KMessageBox::sorry(parentWidget, QString("<qt>") +
i18n("The DVI-file refers to the TeX-file "
"<strong>%1</strong> which could not be found.").arg(KShellProcess::quote(TeXfile)) +
"<strong>%1</strong> which could not be found.").arg(KProcess::quote(TeXfile)) +
QString("</qt>"),
i18n( "Could Not Find File" ));
return;
@ -727,7 +727,7 @@ void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, Documen
else
return;
}
command = command.replace( "%l", QString::number(splitter.line()) ).replace( "%f", KShellProcess::quote(TeXfile) );
command = command.replace( "%l", QString::number(splitter.line()) ).replace( "%f", KProcess::quote(TeXfile) );
#ifdef DEBUG_SPECIAL
kdDebug(kvs::dvi) << "Calling program: " << command << endl;
@ -744,7 +744,7 @@ void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, Documen
}
// Set up a shell process with the editor command.
proc = new KShellProcess();
proc = new KProcess();
if (proc == 0) {
kdError(kvs::dvi) << "Could not allocate ShellProcess for the editor command." << endl;
return;

View file

@ -33,7 +33,6 @@ class KDVIMultiPage;
class KPrinter;
class KProcess;
class KProgressDialog;
class KShellProcess;
class PreBookmark;
class TeXFontDefinition;
@ -281,7 +280,7 @@ private:
/** Used to run and to show the progress of dvips and friends. */
fontProgressDialog *progress;
KShellProcess *proc;
KProcess *proc;
KPrinter *export_printer;
QString export_fileName;
QString export_tmpFileName;

View file

@ -120,7 +120,7 @@ void dviRenderer::exportPDF()
qApp->connect(progress, SIGNAL(finished()), this, SLOT(abortExternalProgramm()));
}
proc = new KShellProcess();
proc = new KProcess();
if (proc == 0) {
kdError(kvs::dvi) << "Could not allocate ShellProcess for the dvipdfm command." << endl;
return;
@ -134,13 +134,13 @@ void dviRenderer::exportPDF()
export_errorString = i18n("<qt>The external program 'dvipdf', which was used to export the file, reported an error. "
"You might wish to look at the <strong>document info dialog</strong> which you will "
"find in the File-Menu for a precise error report.</qt>") ;
info->clear(i18n("Export: %1 to PDF").arg(KShellProcess::quote(dviFile->filename)));
info->clear(i18n("Export: %1 to PDF").arg(KProcess::quote(dviFile->filename)));
proc->clearArguments();
finfo.setFile(dviFile->filename);
*proc << QString("cd %1; dvipdfm").arg(KShellProcess::quote(finfo.dirPath(true)));
*proc << QString("-o %1").arg(KShellProcess::quote(fileName));
*proc << KShellProcess::quote(dviFile->filename);
*proc << QString("cd %1; dvipdfm").arg(KProcess::quote(finfo.dirPath(true)));
*proc << QString("-o %1").arg(KProcess::quote(fileName));
*proc << KProcess::quote(dviFile->filename);
proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) {
kdError(kvs::dvi) << "dvipdfm failed to start" << endl;
@ -286,7 +286,7 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
}
// Allocate and initialize the shell process.
proc = new KShellProcess();
proc = new KProcess();
if (proc == 0) {
kdError(kvs::dvi) << "Could not allocate ShellProcess for the dvips command." << endl;
return;
@ -298,17 +298,17 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
export_errorString = i18n("<qt>The external program 'dvips', which was used to export the file, reported an error. "
"You might wish to look at the <strong>document info dialog</strong> which you will "
"find in the File-Menu for a precise error report.</qt>") ;
info->clear(i18n("Export: %1 to PostScript").arg(KShellProcess::quote(dviFile->filename)));
info->clear(i18n("Export: %1 to PostScript").arg(KProcess::quote(dviFile->filename)));
proc->clearArguments();
QFileInfo finfo(dviFile->filename);
*proc << QString("cd %1; dvips").arg(KShellProcess::quote(finfo.dirPath(true)));
*proc << QString("cd %1; dvips").arg(KProcess::quote(finfo.dirPath(true)));
if (printer == 0)
*proc << "-z"; // export Hyperlinks
if (options.isEmpty() == false)
*proc << options;
*proc << QString("%1").arg(KShellProcess::quote(sourceFileName));
*proc << QString("-o %1").arg(KShellProcess::quote(fileName));
*proc << QString("%1").arg(KProcess::quote(sourceFileName));
*proc << QString("-o %1").arg(KProcess::quote(fileName));
proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::Stderr) == false) {
kdError(kvs::dvi) << "dvips failed to start" << endl;
@ -360,7 +360,7 @@ void dviRenderer::editorCommand_terminated(KProcess *sproc)
KMessageBox::error( parentWidget, export_errorString );
// Let's hope that this is not all too nasty... killing a
// KShellProcess from a slot that was called from the KShellProcess
// KProcess from a slot that was called from the KShellProcess
// itself. Until now, there weren't any problems.
// Perhaps it was a bad idea, after all.