From 14505bbfea220a39c2158480db8ba788707ff332 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 10 Aug 2017 19:59:54 +0200 Subject: 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 --- qmake/library/proitems.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qmake/library') 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) -- cgit v1.2.3