23 #include "commandline.h"
25 #include "apprunner.h"
26 #include "strings.hpp"
31 QStringList::iterator it;
32 for (it = args.begin(); it != args.end(); ++it)
39 static bool needsQuoteWrap(
const QString &arg)
43 QRegExp reallySafestCharsIHope = QRegExp(
"[^a-z0-9/\\_-+]", Qt::CaseInsensitive);
44 return arg.contains(reallySafestCharsIHope);
51 arg.replace(
'"',
"\\\"");
52 if (needsQuoteWrap(arg))
63 arg.replace(
'\'',
"'\\''");
64 if (needsQuoteWrap(arg))
75 QFileInfo binary = arg;
76 if (binary.isBundle())
77 arg += AppRunner::findBundleBinary(binary);