QProcess p(0);
#ifdef _MSC_VER
if(content.startsWith("start")&&content.endsWith(".exe"))
{
//QStringList contentArr=content.split(" ");
//if(contentArr.size()==2)p.startDetached(contentArr.at(1));//遇到空格就没法运行了
QString exePath=content.right(content.size()-6);
p.startDetached(QString("\"%1\"").arg(exePath));
}else p.start("cmd", QStringList()<<"/c"<<content);
#else
if(content.startsWith("ping"))content+=" -c 4";
p.start(content);
#endif
p.waitForStarted();
p.waitForFinished();
response.code=0;
response.message=QString(u8"request success");
response.data=QString::fromLocal8Bit(p.readAllStandardOutput());