[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegraphics/kviewshell/plugins/dvi [POSSIBLY UNSAFE]
From: Stefan Kebekus <kebekus () kde ! org>
Date: 2006-08-22 16:08:05
Message-ID: 1156262885.955668.2777.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 575939 by kebekus:
fixes problems with starting programms from a non-GUI thread
M +6 -3 psgs.cpp [POSSIBLY UNSAFE: system]
--- trunk/KDE/kdegraphics/kviewshell/plugins/dvi/psgs.cpp #575938:575939
@@ -222,15 +222,18 @@
argus << QString("-g%1x%2").arg(pixel_page_w).arg(pixel_page_h); // page size in \
pixels argus << QString("-r%1").arg(resolution); // resolution \
in dpi argus << "-dTextAlphaBits=4 -dGraphicsAlphaBits=2"; // Antialiasing
- argus << "-c" << "<< /PermitFileReading [ ExtraIncludePath ] /PermitFileWriting [] \
/PermitFileControl [] >> setuserparams .locksafe"; + argus << "-c" << \
KProcess::quote("<< /PermitFileReading [ ExtraIncludePath ] /PermitFileWriting [] \
/PermitFileControl [] >> setuserparams .locksafe"); argus << "-f" << PSfileName;
-
+
#ifdef DEBUG_PSGS
kDebug(kvs::dvi) << argus.join(" ") << endl;
#endif
proc << argus;
- if (proc.start(KProcess::Block) == false) {
+ // if (proc.start(KProcess::Block) == false) {
+#warning We uses 'system' here because KProcess often crashes if started from a \
non-gui thread +
+ if (system(argus.join(" ").latin1()) != 0) {
// Starting ghostscript did not work.
// TODO: Issue error message, switch PS support off.
kError(kvs::dvi) << "ghostview could not be started" << endl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic