summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-07-17 16:44:18 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-22 19:52:06 +0200
commit944e1d7b6a34098146fc4868909cb8b457c56eb6 (patch)
tree86fd18122bb2d22f7c44239f52beb4fc149c8129 /qmake/generators/makefile.cpp
parentcc0c394682470eac534822578cb432620a8779a8 (diff)
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>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r--qmake/generators/makefile.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 0ec4a5f235..98b5a328e4 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -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;
}