Commit ae634437 authored by dt's avatar dt
Browse files

On windows the #Command line is escaped with quotes

parent 22f4c619
......@@ -176,6 +176,11 @@ bool QMakeStep::init(const QString &name)
QStringList actualArgs = removeSpecFromArgumentList(value(name, "qmakeArgs").toStringList());
QStringList parsedArgs = removeSpecFromArgumentList(result.second);
qDebug()<<"Actual args:"<<actualArgs;
qDebug()<<"Parsed args:"<<parsedArgs;
qDebug()<<"Actual spec:"<<actualSpec;
qDebug()<<"Parsed spec:"<<parsedSpec;
if (actualArgs == parsedArgs && actualSpec == parsedSpec)
needToRunQMake = false;
}
......
......@@ -633,12 +633,23 @@ QString QtVersionManager::trimLine(const QString line)
QStringList QtVersionManager::splitLine(const QString &line)
{
// Split on each " ", except on those which are escaped
// Also remove all escaping
// On Unix also remove all escaping
// On Windows also, but different escaping
bool escape = false;
QString currentWord;
QStringList results;
int length = line.length();
for (int i=0; i<length; ++i) {
#ifdef Q_OS_WIN
if (line.at(i) == '"') {
escape = !escape;
} else if (escape || line.at(i) != ' ') {
currentWord += line.at(i);
} else {
results << currentWord;
currentWord.clear();;
}
#else
if (escape) {
currentWord += line.at(i);
escape = false;
......@@ -650,6 +661,7 @@ QStringList QtVersionManager::splitLine(const QString &line)
} else {
currentWord += line.at(i);
}
#endif
}
return results;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment