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>
This commit is contained in:
Oswald Buddenhagen 2017-08-10 19:59:54 +02:00 committed by Tony Sarajärvi
parent 9f98935d33
commit 14505bbfea

View File

@ -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)