#include "support/qstring_helpers.h"
#include <QDir>
-#include <QImage>
#include <QTemporaryFile>
#include "support/lassert.h"
}
-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/";
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 + "\" & ";
}