]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.cpp
Fix build with GNU libstdc++ C++11 ABI
[lyx.git] / src / support / filetools.cpp
index 229dd2e1da2b52e487cbc0806a936e3888d9dd28..a05f9845544513b3ecb5781e890efe1dab1fbb2f 100644 (file)
@@ -37,7 +37,6 @@
 #include "support/qstring_helpers.h"
 
 #include <QDir>
-#include <QImage>
 #include <QTemporaryFile>
 
 #include "support/lassert.h"
@@ -416,24 +415,6 @@ FileName const imageLibFileSearch(string & dir, string const & name,
 }
 
 
-int iconScaleFactor(FileName const & image)
-{
-       int imgsize = QImage(toqstr(image.absFileName())).height();
-       if (imgsize <= 0)
-               return 100;
-
-       // default icon size
-       int iconsize = 20;
-
-       string dir = "images";
-       FileName const fn = imageLibFileSearch(dir, "iconsize.png");
-       if (!fn.empty())
-               iconsize = QImage(toqstr(fn.absFileName())).height();
-
-       return (100 * iconsize + imgsize / 2)/imgsize;
-}
-
-
 string const commandPrep(string const & command_in)
 {
        static string const token_scriptpath = "$$s/";
@@ -733,10 +714,11 @@ string latexEnvCmdPrefix(string const & path)
                return "env TEXINPUTS=\"." + sep + texinputs_prefix
                                          + sep + texinputs + "\" ";
        else
-               // NOTE: *any* space in the last string matters! (see bug 9453)
-               return "cmd /d /c set \"TEXINPUTS=."
+               // NOTE: the dummy blank dir is necessary to force the
+               //       QProcess parser to quote the argument (see bug 9453)
+               return "cmd /d /c set \"TEXINPUTS=." + sep + " "
                                                + sep + texinputs_prefix
-                                               + sep + texinputs + " \" & ";
+                                               + sep + texinputs + "\" & ";
 }