summaryrefslogtreecommitdiffstats
path: root/qmake/library/proitems.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-08-31 13:10:18 +0200
committerLiang Qi <liang.qi@qt.io>2017-08-31 14:31:31 +0200
commit112a4af10741409b3d8503cb77852a777b607ce0 (patch)
treefa99f0f37fc1505522fe9368e95484c7732ccda8 /qmake/library/proitems.h
parent29ef0d2bccd1874e20de94485ee05777c3a95c5d (diff)
parente938150412d22e61926fe16791158805b71268bb (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
Diffstat (limited to 'qmake/library/proitems.h')
-rw-r--r--qmake/library/proitems.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/qmake/library/proitems.h b/qmake/library/proitems.h
index c58b017857..1d7ebed3aa 100644
--- a/qmake/library/proitems.h
+++ b/qmake/library/proitems.h
@@ -68,6 +68,7 @@ public:
ProString();
ProString(const ProString &other);
PROITEM_EXPLICIT ProString(const QString &str);
+ PROITEM_EXPLICIT ProString(const QStringRef &str);
PROITEM_EXPLICIT ProString(const char *str);
ProString(const QString &str, int offset, int length);
void setValue(const QString &str);
@@ -94,6 +95,7 @@ public:
bool operator==(const ProString &other) const { return toQStringRef() == other.toQStringRef(); }
bool operator==(const QString &other) const { return toQStringRef() == other; }
+ bool operator==(const QStringRef &other) const { return toQStringRef() == other; }
bool operator==(QLatin1String other) const { return toQStringRef() == other; }
bool operator==(const char *other) const { return toQStringRef() == QLatin1String(other); }
bool operator!=(const ProString &other) const { return !(*this == other); }
@@ -204,14 +206,14 @@ Q_DECLARE_TYPEINFO(ProKey, Q_MOVABLE_TYPE);
uint qHash(const ProString &str);
QString operator+(const ProString &one, const ProString &two);
inline QString operator+(const ProString &one, const QString &two)
- { return one + ProString(two); }
+ { return one.toQStringRef() + two; }
inline QString operator+(const QString &one, const ProString &two)
- { return ProString(one) + 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)