From ad7d953963a1cf0d3a082eb374c6a6cd229062b4 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 23 May 2012 16:35:07 +0300 Subject: [PATCH] Declare typeinfo-s for QLatin1String, QStringRef, and QCharRef Change-Id: I05e0f866c632f2a7e966e6bae9c73eeb77d99217 Reviewed-by: Thiago Macieira --- src/corelib/tools/qstring.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 34e3dbde4f..47ac45ac06 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -114,6 +114,7 @@ private: int m_size; const char *m_data; }; +Q_DECLARE_TYPEINFO(QLatin1String, Q_MOVABLE_TYPE); // Qt 4.x compatibility typedef QLatin1String QLatin1Literal; @@ -910,6 +911,7 @@ public: ushort& unicode() { return s.data()[i].unicode(); } }; +Q_DECLARE_TYPEINFO(QCharRef, Q_MOVABLE_TYPE); inline void QCharRef::setRow(uchar arow) { QChar(*this).setRow(arow); } inline void QCharRef::setCell(uchar acell) { QChar(*this).setCell(acell); } @@ -1285,6 +1287,7 @@ public: static int localeAwareCompare(const QStringRef &s1, const QString &s2); static int localeAwareCompare(const QStringRef &s1, const QStringRef &s2); }; +Q_DECLARE_TYPEINFO(QStringRef, Q_PRIMITIVE_TYPE); inline QStringRef &QStringRef::operator=(const QString *aString) { m_string = aString; m_position = 0; m_size = aString?aString->size():0; return *this; }