summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-08-10 19:59:54 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-09-14 13:49:48 +0000
commit8abd3f0bf7af663ff4ffe57b5d70bfa5c2d00f6c (patch)
treeb36c8d1d18d1a4d4d757f904b388b1e67b43bf97
parent45c56d19ced917a1786aa5dd41941eb435497379 (diff)
downloadqttools-8abd3f0bf7af663ff4ffe57b5d70bfa5c2d00f6c.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 d5014234f. Change-Id: I521c0e89a8b0c1ae62b1450e81b0ae91a931bcfa Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from qtbase/14505bbfea220a39c2158480db8ba788707ff332) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/linguist/shared/proitems.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linguist/shared/proitems.h b/src/linguist/shared/proitems.h
index 978533bbc..177b4cbcd 100644
--- a/src/linguist/shared/proitems.h
+++ b/src/linguist/shared/proitems.h
@@ -211,9 +211,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)