23 #include "commandline.h" 
   25 #include "apprunner.h" 
   26 #include "strings.hpp" 
   27 #include <QRegularExpression> 
   31         QStringList::iterator it;
 
   32         for (it = args.begin(); it != args.end(); ++it)
 
   39 static bool needsQuoteWrap(
const QString &arg)
 
   43         const auto reallySafestCharsIHope = QRegularExpression(
"[^a-z0-9/\\\\_\\-+]", QRegularExpression::CaseInsensitiveOption);
 
   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);