optimize operator+ ProString vs. char*

we have all necessary overloads now.

Change-Id: Ic4472eba15d4234e968fcb9443d0f79011aa43fd
(cherry picked from qtbase/f137957e0887a9321b69b9ba83ed6ccaedee57bb)
(cherry picked from qtbase/14505bbfea220a39c2158480db8ba788707ff332)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Oswald Buddenhagen
2018-03-05 18:42:35 +01:00
parent c86ea1c8ce
commit d5014234f2

View File

@@ -206,9 +206,9 @@ inline QString operator+(const QString &one, const ProString &two)
{ return one + two.toQStringRef(); } { return one + two.toQStringRef(); }
inline QString operator+(const ProString &one, const char *two) inline QString operator+(const ProString &one, const char *two)
{ return one + ProString(two); } // XXX optimize { return one.toQStringRef() + QLatin1String(two); }
inline QString operator+(const char *one, const ProString &two) inline QString operator+(const char *one, const ProString &two)
{ return ProString(one) + two; } // XXX optimize { return QLatin1String(one) + two.toQStringRef(); }
inline QString &operator+=(QString &that, const ProString &other) inline QString &operator+=(QString &that, const ProString &other)
{ return that += other.toQStringRef(); } { return that += other.toQStringRef(); }