diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-08-10 19:59:54 +0200 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@qt.io> | 2017-08-26 12:11:57 +0000 |
commit | 14505bbfea220a39c2158480db8ba788707ff332 (patch) | |
tree | c14d253a4c9e9d1c07b4b9c4bfb90ee3628df36c /qmake | |
parent | 9f98935d33cc15c938be2b9295ba2fbe4edb0ee0 (diff) | |
download | qtbase-14505bbfea220a39c2158480db8ba788707ff332.tar.gz |
qmake: remove seemingly pointless QString::detach() calls
it's not clear why detaching would be necessary; there is no danger of a
raw data leak here.
concatenating a QStringRef with a non-empty QLatin1String (the only
expected use of this overload) will yield a detached QString anyway, so
this makes little difference in practice.
amends f137957e08.
Change-Id: I521c0e89a8b0c1ae62b1450e81b0ae91a931bcfa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/library/proitems.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qmake/library/proitems.h b/qmake/library/proitems.h index 5bfacf0b46..8f88883683 100644 --- a/qmake/library/proitems.h +++ b/qmake/library/proitems.h @@ -210,9 +210,9 @@ inline QString operator+(const QString &one, const ProString &two) { return one + two.toQStringRef(); } inline QString operator+(const ProString &one, const char *two) - { QString ret = one.toQStringRef() + QLatin1String(two); ret.detach(); return ret; } + { return one.toQStringRef() + QLatin1String(two); } inline QString operator+(const char *one, const ProString &two) - { QString ret = QLatin1String(one) + two.toQStringRef(); ret.detach(); return ret; } + { return QLatin1String(one) + two.toQStringRef(); } inline QString operator+(const ProString &one, QChar two) { return one.toQStringRef() + two; } inline QString operator+(QChar one, const ProString &two) |