make unescapeFilePath() less inefficient
replace() doesn't detach if there is nothing to do. Change-Id: I845b585c766f44a670ca3af1fc11ba03e7317622 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
cc0c394682
commit
944e1d7b6a
@ -2763,12 +2763,8 @@ QString
|
||||
MakefileGenerator::unescapeFilePath(const QString &path) const
|
||||
{
|
||||
QString ret = path;
|
||||
if(!ret.isEmpty()) {
|
||||
if(ret.contains(QLatin1String("\\ ")))
|
||||
ret.replace(QLatin1String("\\ "), QLatin1String(" "));
|
||||
if(ret.contains(QLatin1Char('\"')))
|
||||
ret.remove(QLatin1Char('\"'));
|
||||
}
|
||||
ret.replace(QLatin1String("\\ "), QLatin1String(" "));
|
||||
ret.remove(QLatin1Char('\"'));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user