File escape_doublequotes.patch of Package kpl

diff -ru kpl50/lib/imageitem.cpp kpl50-new/lib/imageitem.cpp
--- kpl50/lib/imageitem.cpp	2017-01-01 16:39:57.000000000 +0100
+++ kpl50-new/lib/imageitem.cpp	2024-06-03 22:54:17.234470084 +0200
@@ -186,7 +186,7 @@
                          double xScale, double yScale, const char format[])
 {
   QProcess p;
-  p.start(QString("gs -sOutputFile=%1 -q -g%2x%3 -dSAFER -dBATCH -dNOPAUSE "
+  p.start(QString("gs -sOutputFile=\"%1\" -q -g%2x%3 -dSAFER -dBATCH -dNOPAUSE "
                   "-sDEVICE=%4 -dGraphicsAlphaBits=4"
                   " -dTextAlphaBits=4 -").arg(imageFile).arg(width).
                                           arg(height).arg(format));
diff -ru kpl50/lib/kplscene.cpp kpl50-new/lib/kplscene.cpp
--- kpl50/lib/kplscene.cpp	2017-01-02 23:31:29.000000000 +0100
+++ kpl50-new/lib/kplscene.cpp	2024-06-03 23:02:27.137782826 +0200
@@ -137,7 +137,7 @@
     QString epsFile = Utils::tempFileName(".eps");
     if ((success = savePS(Utils::url(epsFile), false, boundingBox))) {
       QProcess p;
-      p.start(QString("gs -sOutputFile=%1 -q -dSAFER -dBATCH -dNOPAUSE "
+      p.start(QString("gs -sOutputFile=\"%1\" -q -dSAFER -dBATCH -dNOPAUSE "
                       "-dEPSCrop -sDEVICE=%2 %3").arg(imageFile).arg(opt).
               arg(epsFile));
       success = p.waitForFinished();
@@ -453,7 +453,7 @@
   if (boundingBox) {
     QProcess p;
     p.start(QString("gs -q -dSAFER -dBATCH -dNOPAUSE "
-                    "-sDEVICE=bbox %1").arg(tmpFile));
+                    "-sDEVICE=bbox \"%1\"").arg(tmpFile));
     if ((success = p.waitForFinished(-1))) {
       QByteArray bbox = p.readAllStandardError();
       QFile f1(tmpFile);
openSUSE Build Service is sponsored by