summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-02-29 00:57:12 +0100
committerJoão Abecasis <joao.abecasis@nokia.com>2012-02-29 00:58:13 +0100
commitc4ad58ed2252d5ed9f448a5c068ab33dce4cadd9 (patch)
tree7e9802171d7b4c641c2de1ef781023cab5d7d14c /src/corelib/tools
parent7da3a61b5fd5cc726f8fd62691aa5f84c7929800 (diff)
parentfa1b9070af66edb81b2a3735c1951f78b22bd666 (diff)
Merge remote-tracking branch 'gerrit/master' into containers
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qchar.cpp63
-rw-r--r--src/corelib/tools/qchar.h13
-rw-r--r--src/corelib/tools/qcryptographichash.cpp106
-rw-r--r--src/corelib/tools/qcryptographichash.h6
-rw-r--r--src/corelib/tools/qeasingcurve.cpp29
-rw-r--r--src/corelib/tools/qeasingcurve.h12
-rw-r--r--src/corelib/tools/qelapsedtimer_win.cpp4
-rw-r--r--src/corelib/tools/qhash.cpp2
-rw-r--r--src/corelib/tools/qline.h142
-rw-r--r--src/corelib/tools/qlist.h2
-rw-r--r--src/corelib/tools/qlocale.cpp2
-rw-r--r--src/corelib/tools/qlocale.qdoc4
-rw-r--r--src/corelib/tools/qlocale_p.h4
-rw-r--r--src/corelib/tools/qlocale_win.cpp2
-rw-r--r--src/corelib/tools/qmargins.h37
-rw-r--r--src/corelib/tools/qpoint.h134
-rw-r--r--src/corelib/tools/qrect.h242
-rw-r--r--src/corelib/tools/qregexp.cpp2
-rw-r--r--src/corelib/tools/qsize.h139
-rw-r--r--src/corelib/tools/qstring.cpp232
-rw-r--r--src/corelib/tools/qstring.h13
-rw-r--r--src/corelib/tools/qstringbuilder.cpp29
-rw-r--r--src/corelib/tools/qstringbuilder.h44
-rw-r--r--src/corelib/tools/qunicodetables.cpp392
24 files changed, 808 insertions, 847 deletions
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp
index 01241dce6b..0261843a3a 100644
--- a/src/corelib/tools/qchar.cpp
+++ b/src/corelib/tools/qchar.cpp
@@ -413,33 +413,16 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn QChar::QChar(char ch)
+
Constructs a QChar corresponding to ASCII/Latin-1 character \a ch.
*/
-QChar::QChar(char ch)
-{
-#ifndef QT_NO_CODEC_FOR_C_STRINGS
- if (QTextCodec::codecForCStrings())
- // #####
- ucs = QTextCodec::codecForCStrings()->toUnicode(&ch, 1).at(0).unicode();
- else
-#endif
- ucs = uchar(ch);
-}
/*!
+ \fn QChar::QChar(uchar ch)
+
Constructs a QChar corresponding to ASCII/Latin-1 character \a ch.
*/
-QChar::QChar(uchar ch)
-{
-#ifndef QT_NO_CODEC_FOR_C_STRINGS
- if (QTextCodec::codecForCStrings()) {
- // #####
- char c = char(ch);
- ucs = QTextCodec::codecForCStrings()->toUnicode(&c, 1).at(0).unicode();
- } else
-#endif
- ucs = ch;
-}
/*!
\fn QChar::QChar(uchar cell, uchar row)
@@ -1256,49 +1239,35 @@ ushort QChar::toCaseFolded(ushort ucs2)
Returns the Latin-1 character equivalent to the QChar, or 0. This
is mainly useful for non-internationalized software.
- \sa toAscii(), unicode(), QTextCodec::codecForCStrings()
+ \sa toAscii(), unicode()
*/
/*!
- Returns the character value of the QChar obtained using the current
- codec used to read C strings, or 0 if the character is not representable
- using this codec. The default codec handles Latin-1 encoded text,
- but this can be changed to assist developers writing source code using
- other encodings.
+ \fn char QChar::toAscii() const
+
+ Returns the Latin-1 character value of the QChar, or 0 if the character is not
+ representable.
The main purpose of this function is to preserve ASCII characters used
in C strings. This is mainly useful for developers of non-internationalized
software.
- \sa toLatin1(), unicode(), QTextCodec::codecForCStrings()
+ \note It is not possible to distinguish a non-Latin 1 character from an ASCII 0
+ (NUL) character. Prefer to use unicode(), which does not have this ambiguity.
+
+ \sa toLatin1(), unicode()
*/
-char QChar::toAscii() const
-{
-#ifndef QT_NO_CODEC_FOR_C_STRINGS
- if (QTextCodec::codecForCStrings())
- // #####
- return QTextCodec::codecForCStrings()->fromUnicode(QString(*this)).at(0);
-#endif
- return ucs > 0xff ? 0 : char(ucs);
-}
/*!
+ \fn QChar QChar::fromAscii(char)
+
Converts the ASCII character \a c to it's equivalent QChar. This
is mainly useful for non-internationalized software.
An alternative is to use QLatin1Char.
- \sa fromLatin1(), unicode(), QTextCodec::codecForCStrings()
+ \sa fromLatin1(), unicode()
*/
-QChar QChar::fromAscii(char c)
-{
-#ifndef QT_NO_CODEC_FOR_C_STRINGS
- if (QTextCodec::codecForCStrings())
- // #####
- return QTextCodec::codecForCStrings()->toUnicode(&c, 1).at(0).unicode();
-#endif
- return QChar(ushort((uchar)c));
-}
#ifndef QT_NO_DATASTREAM
/*!
diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h
index df3d7eac33..3209ffb0f2 100644
--- a/src/corelib/tools/qchar.h
+++ b/src/corelib/tools/qchar.h
@@ -86,9 +86,8 @@ public:
Q_DECL_CONSTEXPR QChar(QLatin1Char ch) : ucs(ch.unicode()) {} // implicit
#ifndef QT_NO_CAST_FROM_ASCII
- // these two constructors are NOT inline const_expr!
- QT_ASCII_CAST_WARN_CONSTRUCTOR explicit QChar(char c);
- QT_ASCII_CAST_WARN_CONSTRUCTOR explicit QChar(uchar c);
+ QT_ASCII_CAST_WARN Q_DECL_CONSTEXPR explicit QChar(char c) : ucs(uchar(c)) { }
+ QT_ASCII_CAST_WARN Q_DECL_CONSTEXPR explicit QChar(uchar c) : ucs(c) { }
#endif
// Unicode information
@@ -222,13 +221,13 @@ public:
UnicodeVersion unicodeVersion() const;
- char toAscii() const;
+ inline char toAscii() const;
inline char toLatin1() const;
inline ushort unicode() const { return ucs; }
inline ushort &unicode() { return ucs; }
- static QChar fromAscii(char c);
- static QChar fromLatin1(char c);
+ static inline QChar fromAscii(char c);
+ static inline QChar fromLatin1(char c);
inline bool isNull() const { return ucs == 0; }
bool isPrint() const;
@@ -344,8 +343,10 @@ private:
Q_DECLARE_TYPEINFO(QChar, Q_MOVABLE_TYPE);
+inline char QChar::toAscii() const { return ucs > 0xff ? 0 : char(ucs); }
inline char QChar::toLatin1() const { return ucs > 0xff ? '\0' : char(ucs); }
inline QChar QChar::fromLatin1(char c) { return QChar(ushort(uchar(c))); }
+inline QChar QChar::fromAscii(char c) { return QChar(ushort(uchar(c))); }
inline void QChar::setCell(uchar acell)
{ ucs = ushort((ucs & 0xff00) + acell); }
diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp
index 164660f818..31a0fdc5e6 100644
--- a/src/corelib/tools/qcryptographichash.cpp
+++ b/src/corelib/tools/qcryptographichash.cpp
@@ -46,8 +46,53 @@
#include "../../3rdparty/md4/md4.h"
#include "../../3rdparty/md4/md4.cpp"
#include "../../3rdparty/sha1/sha1.cpp"
+
+/*
+ These typedefs are needed by the RFC6234 code. Normally they would come
+ from from stdint.h, but since this header is not available on all platforms
+ (MSVC 2008, for example), we need to define them ourselves.
+*/
+typedef QT_PREPEND_NAMESPACE(quint64) uint64_t;
+typedef QT_PREPEND_NAMESPACE(quint32) uint32_t;
+typedef QT_PREPEND_NAMESPACE(quint8) uint8_t;
+typedef QT_PREPEND_NAMESPACE(qint16) int_least16_t;
+// Header from rfc6234 with 1 modification:
+// sha1.h - commented out '#include <stdint.h>' on line 74
+#include "../../3rdparty/rfc6234/sha.h"
+
+/*
+ These 2 functions replace macros of the same name in sha224-256.c and
+ sha384-512.c. Originally, these macros relied on a global static 'addTemp'
+ variable. We do not want this for 2 reasons:
+
+ 1. since we are including the sources directly, the declaration of the 2 conflict
+
+ 2. static variables are not thread-safe, we do not want multiple threads
+ computing a hash to corrupt one another
+*/
+static int SHA224_256AddLength(SHA256Context *context, unsigned int length);
+static int SHA384_512AddLength(SHA512Context *context, unsigned int length);
+
+// Sources from rfc6234, with 4 modifications:
+// sha224-256.c - commented out 'static uint32_t addTemp;' on line 68
+// sha224-256.c - appended 'M' to the SHA224_256AddLength macro on line 70
+#include "../../3rdparty/rfc6234/sha224-256.c"
+// sha384-512.c - commented out 'static uint64_t addTemp;' on line 302
+// sha384-512.c - appended 'M' to the SHA224_256AddLength macro on line 304
+#include "../../3rdparty/rfc6234/sha384-512.c"
+
#include <qiodevice.h>
+static inline int SHA224_256AddLength(SHA256Context *context, unsigned int length)
+{
+ uint32_t addTemp;
+ return SHA224_256AddLengthM(context, length);
+}
+static inline int SHA384_512AddLength(SHA512Context *context, unsigned int length)
+{
+ uint64_t addTemp;
+ return SHA384_512AddLengthM(context, length);
+}
QT_BEGIN_NAMESPACE
@@ -59,6 +104,10 @@ public:
MD5Context md5Context;
md4_context md4Context;
Sha1State sha1Context;
+ SHA224Context sha224Context;
+ SHA256Context sha256Context;
+ SHA384Context sha384Context;
+ SHA512Context sha512Context;
};
QByteArray result;
};
@@ -75,7 +124,7 @@ public:
QCryptographicHash can be used to generate cryptographic hashes of binary or text data.
- Currently MD4, MD5, and SHA-1 are supported.
+ Currently MD4, MD5, SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 are supported.
*/
/*!
@@ -83,7 +132,11 @@ public:
\value Md4 Generate an MD4 hash sum
\value Md5 Generate an MD5 hash sum
- \value Sha1 Generate an SHA1 hash sum
+ \value Sha1 Generate an SHA-1 hash sum
+ \value Sha224 Generate an SHA-224 hash sum
+ \value Sha256 Generate an SHA-256 hash sum
+ \value Sha384 Generate an SHA-384 hash sum
+ \value Sha512 Generate an SHA-512 hash sum
*/
/*!
@@ -119,6 +172,18 @@ void QCryptographicHash::reset()
case Sha1:
sha1InitState(&d->sha1Context);
break;
+ case Sha224:
+ SHA224Reset(&d->sha224Context);
+ break;
+ case Sha256:
+ SHA256Reset(&d->sha256Context);
+ break;
+ case Sha384:
+ SHA384Reset(&d->sha384Context);
+ break;
+ case Sha512:
+ SHA512Reset(&d->sha512Context);
+ break;
}
d->result.clear();
}
@@ -139,6 +204,18 @@ void QCryptographicHash::addData(const char *data, int length)
case Sha1:
sha1Update(&d->sha1Context, (const unsigned char *)data, length);
break;
+ case Sha224:
+ SHA224Input(&d->sha224Context, reinterpret_cast<const unsigned char *>(data), length);
+ break;
+ case Sha256:
+ SHA256Input(&d->sha256Context, reinterpret_cast<const unsigned char *>(data), length);
+ break;
+ case Sha384:
+ SHA384Input(&d->sha384Context, reinterpret_cast<const unsigned char *>(data), length);
+ break;
+ case Sha512:
+ SHA512Input(&d->sha512Context, reinterpret_cast<const unsigned char *>(data), length);
+ break;
}
d->result.clear();
}
@@ -201,6 +278,31 @@ QByteArray QCryptographicHash::result() const
d->result.resize(20);
sha1FinalizeState(&copy);
sha1ToHash(&copy, (unsigned char *)d->result.data());
+ break;
+ }
+ case Sha224: {
+ SHA224Context copy = d->sha224Context;
+ d->result.resize(SHA224HashSize);
+ SHA224Result(&copy, reinterpret_cast<unsigned char *>(d->result.data()));
+ break;
+ }
+ case Sha256:{
+ SHA256Context copy = d->sha256Context;
+ d->result.resize(SHA256HashSize);
+ SHA256Result(&copy, reinterpret_cast<unsigned char *>(d->result.data()));
+ break;
+ }
+ case Sha384:{
+ SHA384Context copy = d->sha384Context;
+ d->result.resize(SHA384HashSize);
+ SHA384Result(&copy, reinterpret_cast<unsigned char *>(d->result.data()));
+ break;
+ }
+ case Sha512:{
+ SHA512Context copy = d->sha512Context;
+ d->result.resize(SHA512HashSize);
+ SHA512Result(&copy, reinterpret_cast<unsigned char *>(d->result.data()));
+ break;
}
}
return d->result;
diff --git a/src/corelib/tools/qcryptographichash.h b/src/corelib/tools/qcryptographichash.h
index 59314e1963..2bfc03373a 100644
--- a/src/corelib/tools/qcryptographichash.h
+++ b/src/corelib/tools/qcryptographichash.h
@@ -58,7 +58,11 @@ public:
enum Algorithm {
Md4,
Md5,
- Sha1
+ Sha1,
+ Sha224,
+ Sha256,
+ Sha384,
+ Sha512
};
QCryptographicHash(Algorithm method);
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index 5731faa69c..81778f908f 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -419,6 +419,11 @@ public:
config(0),
func(&easeNone)
{ }
+ QEasingCurvePrivate(const QEasingCurvePrivate &other)
+ : type(other.type),
+ config(other.config ? other.config->copy() : 0),
+ func(other.func)
+ { }
~QEasingCurvePrivate() { delete config; }
void setType_helper(QEasingCurve::Type);
@@ -1080,12 +1085,9 @@ QEasingCurve::QEasingCurve(Type type)
Construct a copy of \a other.
*/
QEasingCurve::QEasingCurve(const QEasingCurve &other)
- : d_ptr(new QEasingCurvePrivate)
+ : d_ptr(new QEasingCurvePrivate(*other.d_ptr))
{
// ### non-atomic, requires malloc on shallow copy
- *d_ptr = *other.d_ptr;
- if (other.d_ptr->config)
- d_ptr->config = other.d_ptr->config->copy();
}
/*!
@@ -1098,22 +1100,17 @@ QEasingCurve::~QEasingCurve()
}
/*!
+ \fn QEasingCurve &QEasingCurve::operator=(const QEasingCurve &other)
Copy \a other.
*/
-QEasingCurve &QEasingCurve::operator=(const QEasingCurve &other)
-{
- // ### non-atomic, requires malloc on shallow copy
- if (d_ptr->config) {
- delete d_ptr->config;
- d_ptr->config = 0;
- }
- *d_ptr = *other.d_ptr;
- if (other.d_ptr->config)
- d_ptr->config = other.d_ptr->config->copy();
+/*!
+ \fn void QEasingCurve::swap(QEasingCurve &other)
+ \since 5.0
- return *this;
-}
+ Swaps curve \a other with this curve. This operation is very
+ fast and never fails.
+*/
/*!
Compare this easing curve with \a other and returns true if they are
diff --git a/src/corelib/tools/qeasingcurve.h b/src/corelib/tools/qeasingcurve.h
index ad2e510799..f3c7c9b618 100644
--- a/src/corelib/tools/qeasingcurve.h
+++ b/src/corelib/tools/qeasingcurve.h
@@ -82,7 +82,16 @@ public:
QEasingCurve(const QEasingCurve &other);
~QEasingCurve();
- QEasingCurve &operator=(const QEasingCurve &other);
+ QEasingCurve &operator=(const QEasingCurve &other)
+ { if ( this != &other ) { QEasingCurve copy(other); swap(copy); } return *this; }
+#ifdef Q_COMPILER_RVALUE_REFS
+ QEasingCurve(QEasingCurve &&other) : d_ptr(other.d_ptr) { other.d_ptr = 0; }
+ QEasingCurve &operator=(QEasingCurve &&other)
+ { qSwap(d_ptr, other.d_ptr); return *this; }
+#endif
+
+ inline void swap(QEasingCurve &other) { qSwap(d_ptr, other.d_ptr); }
+
bool operator==(const QEasingCurve &other) const;
inline bool operator!=(const QEasingCurve &other) const
{ return !(this->operator==(other)); }
@@ -120,6 +129,7 @@ private:
friend Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QEasingCurve &);
#endif
};
+Q_DECLARE_TYPEINFO(QEasingCurve, Q_MOVABLE_TYPE);
#ifndef QT_NO_DEBUG_STREAM
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QEasingCurve &item);
diff --git a/src/corelib/tools/qelapsedtimer_win.cpp b/src/corelib/tools/qelapsedtimer_win.cpp
index b1faf22c3f..8171a27ea3 100644
--- a/src/corelib/tools/qelapsedtimer_win.cpp
+++ b/src/corelib/tools/qelapsedtimer_win.cpp
@@ -83,7 +83,9 @@ static inline qint64 ticksToNanoseconds(qint64 ticks)
{
if (counterFrequency > 0) {
// QueryPerformanceCounter uses an arbitrary frequency
- return ticks * 1000000000 / counterFrequency;
+ qint64 seconds = ticks / counterFrequency;
+ qint64 nanoSeconds = (ticks - seconds * counterFrequency) * 1000000000 / counterFrequency;
+ return seconds * 1000000000 + nanoSeconds;
} else {
// GetTickCount(64) return milliseconds
return ticks * 1000000;
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 18537023ad..e0cd068158 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -403,7 +403,7 @@ void QHashData::dump()
}
n = n->next;
}
- qDebug(qPrintable(line));
+ qDebug("%s", qPrintable(line));
}
}
}
diff --git a/src/corelib/tools/qline.h b/src/corelib/tools/qline.h
index 58ef0316ad..92ea4ea426 100644
--- a/src/corelib/tools/qline.h
+++ b/src/corelib/tools/qline.h
@@ -56,37 +56,37 @@ QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QLine
{
public:
- inline QLine();
- inline QLine(const QPoint &pt1, const QPoint &pt2);
- inline QLine(int x1, int y1, int x2, int y2);
+ Q_DECL_CONSTEXPR inline QLine();
+ Q_DECL_CONSTEXPR inline QLine(const QPoint &pt1, const QPoint &pt2);
+ Q_DECL_CONSTEXPR inline QLine(int x1, int y1, int x2, int y2);
- inline bool isNull() const;
+ Q_DECL_CONSTEXPR inline bool isNull() const;
- inline QPoint p1() const;
- inline QPoint p2() const;
+ Q_DECL_CONSTEXPR inline QPoint p1() const;
+ Q_DECL_CONSTEXPR inline QPoint p2() const;
- inline int x1() const;
- inline int y1() const;
+ Q_DECL_CONSTEXPR inline int x1() const;
+ Q_DECL_CONSTEXPR inline int y1() const;
- inline int x2() const;
- inline int y2() const;
+ Q_DECL_CONSTEXPR inline int x2() const;
+ Q_DECL_CONSTEXPR inline int y2() const;
- inline int dx() const;
- inline int dy() const;
+ Q_DECL_CONSTEXPR inline int dx() const;
+ Q_DECL_CONSTEXPR inline int dy() const;
inline void translate(const QPoint &p);
inline void translate(int dx, int dy);
- inline QLine translated(const QPoint &p) const;
- inline QLine translated(int dx, int dy) const;
+ Q_DECL_CONSTEXPR inline QLine translated(const QPoint &p) const;
+ Q_DECL_CONSTEXPR inline QLine translated(int dx, int dy) const;
inline void setP1(const QPoint &p1);
inline void setP2(const QPoint &p2);
inline void setPoints(const QPoint &p1, const QPoint &p2);
inline void setLine(int x1, int y1, int x2, int y2);
- inline bool operator==(const QLine &d) const;
- inline bool operator!=(const QLine &d) const { return !(*this == d); }
+ Q_DECL_CONSTEXPR inline bool operator==(const QLine &d) const;
+ Q_DECL_CONSTEXPR inline bool operator!=(const QLine &d) const { return !(*this == d); }
private:
QPoint pt1, pt2;
@@ -97,53 +97,53 @@ Q_DECLARE_TYPEINFO(QLine, Q_MOVABLE_TYPE);
* class QLine inline members
*******************************************************************************/
-inline QLine::QLine() { }
+Q_DECL_CONSTEXPR inline QLine::QLine() { }
-inline QLine::QLine(const QPoint &pt1_, const QPoint &pt2_) : pt1(pt1_), pt2(pt2_) { }
+Q_DECL_CONSTEXPR inline QLine::QLine(const QPoint &pt1_, const QPoint &pt2_) : pt1(pt1_), pt2(pt2_) { }
-inline QLine::QLine(int x1pos, int y1pos, int x2pos, int y2pos) : pt1(QPoint(x1pos, y1pos)), pt2(QPoint(x2pos, y2pos)) { }
+Q_DECL_CONSTEXPR inline QLine::QLine(int x1pos, int y1pos, int x2pos, int y2pos) : pt1(QPoint(x1pos, y1pos)), pt2(QPoint(x2pos, y2pos)) { }
-inline bool QLine::isNull() const
+Q_DECL_CONSTEXPR inline bool QLine::isNull() const
{
return pt1 == pt2;
}
-inline int QLine::x1() const
+Q_DECL_CONSTEXPR inline int QLine::x1() const
{
return pt1.x();
}
-inline int QLine::y1() const
+Q_DECL_CONSTEXPR inline int QLine::y1() const
{
return pt1.y();
}
-inline int QLine::x2() const
+Q_DECL_CONSTEXPR inline int QLine::x2() const
{
return pt2.x();
}
-inline int QLine::y2() const
+Q_DECL_CONSTEXPR inline int QLine::y2() const
{
return pt2.y();
}
-inline QPoint QLine::p1() const
+Q_DECL_CONSTEXPR inline QPoint QLine::p1() const
{
return pt1;
}
-inline QPoint QLine::p2() const
+Q_DECL_CONSTEXPR inline QPoint QLine::p2() const
{
return pt2;
}
-inline int QLine::dx() const
+Q_DECL_CONSTEXPR inline int QLine::dx() const
{
return pt2.x() - pt1.x();
}
-inline int QLine::dy() const
+Q_DECL_CONSTEXPR inline int QLine::dy() const
{
return pt2.y() - pt1.y();
}
@@ -159,12 +159,12 @@ inline void QLine::translate(int adx, int ady)
this->translate(QPoint(adx, ady));
}
-inline QLine QLine::translated(const QPoint &p) const
+Q_DECL_CONSTEXPR inline QLine QLine::translated(const QPoint &p) const
{
return QLine(pt1 + p, pt2 + p);
}
-inline QLine QLine::translated(int adx, int ady) const
+Q_DECL_CONSTEXPR inline QLine QLine::translated(int adx, int ady) const
{
return translated(QPoint(adx, ady));
}
@@ -191,7 +191,7 @@ inline void QLine::setLine(int aX1, int aY1, int aX2, int aY2)
pt2 = QPoint(aX2, aY2);
}
-inline bool QLine::operator==(const QLine &d) const
+Q_DECL_CONSTEXPR inline bool QLine::operator==(const QLine &d) const
{
return pt1 == d.pt1 && pt2 == d.pt2;
}
@@ -213,26 +213,26 @@ public:
enum IntersectType { NoIntersection, BoundedIntersection, UnboundedIntersection };
- inline QLineF();
- inline QLineF(const QPointF &pt1, const QPointF &pt2);
- inline QLineF(qreal x1, qreal y1, qreal x2, qreal y2);
- inline QLineF(const QLine &line) : pt1(line.p1()), pt2(line.p2()) { }
+ Q_DECL_CONSTEXPR inline QLineF();
+ Q_DECL_CONSTEXPR inline QLineF(const QPointF &pt1, const QPointF &pt2);
+ Q_DECL_CONSTEXPR inline QLineF(qreal x1, qreal y1, qreal x2, qreal y2);
+ Q_DECL_CONSTEXPR inline QLineF(const QLine &line) : pt1(line.p1()), pt2(line.p2()) { }
static QLineF fromPolar(qreal length, qreal angle);
- bool isNull() const;
+ Q_DECL_CONSTEXPR bool isNull() const;
- inline QPointF p1() const;
- inline QPointF p2() const;
+ Q_DECL_CONSTEXPR inline QPointF p1() const;
+ Q_DECL_CONSTEXPR inline QPointF p2() const;
- inline qreal x1() const;
- inline qreal y1() const;
+ Q_DECL_CONSTEXPR inline qreal x1() const;
+ Q_DECL_CONSTEXPR inline qreal y1() const;
- inline qreal x2() const;
- inline qreal y2() const;
+ Q_DECL_CONSTEXPR inline qreal x2() const;
+ Q_DECL_CONSTEXPR inline qreal y2() const;
- inline qreal dx() const;
- inline qreal dy() const;
+ Q_DECL_CONSTEXPR inline qreal dx() const;
+ Q_DECL_CONSTEXPR inline qreal dy() const;
qreal length() const;
void setLength(qreal len);
@@ -243,29 +243,29 @@ public:
qreal angleTo(const QLineF &l) const;
QLineF unitVector() const;
- QLineF normalVector() const;
+ Q_DECL_CONSTEXPR inline QLineF normalVector() const;
// ### Qt 5: rename intersects() or intersection() and rename IntersectType IntersectionType
IntersectType intersect(const QLineF &l, QPointF *intersectionPoint) const;
qreal angle(const QLineF &l) const;
- QPointF pointAt(qreal t) const;
+ Q_DECL_CONSTEXPR inline QPointF pointAt(qreal t) const;
inline void translate(const QPointF &p);
inline void translate(qreal dx, qreal dy);
- inline QLineF translated(const QPointF &p) const;
- inline QLineF translated(qreal dx, qreal dy) const;
+ Q_DECL_CONSTEXPR inline QLineF translated(const QPointF &p) const;
+ Q_DECL_CONSTEXPR inline QLineF translated(qreal dx, qreal dy) const;
inline void setP1(const QPointF &p1);
inline void setP2(const QPointF &p2);
inline void setPoints(const QPointF &p1, const QPointF &p2);
inline void setLine(qreal x1, qreal y1, qreal x2, qreal y2);
- inline bool operator==(const QLineF &d) const;
- inline bool operator!=(const QLineF &d) const { return !(*this == d); }
+ Q_DECL_CONSTEXPR inline bool operator==(const QLineF &d) const;
+ Q_DECL_CONSTEXPR inline bool operator!=(const QLineF &d) const { return !(*this == d); }
- QLine toLine() const;
+ Q_DECL_CONSTEXPR QLine toLine() const;
private:
QPointF pt1, pt2;
@@ -276,66 +276,66 @@ Q_DECLARE_TYPEINFO(QLineF, Q_MOVABLE_TYPE);
* class QLineF inline members
*******************************************************************************/
-inline QLineF::QLineF()
+Q_DECL_CONSTEXPR inline QLineF::QLineF()
{
}
-inline QLineF::QLineF(const QPointF &apt1, const QPointF &apt2)
+Q_DECL_CONSTEXPR inline QLineF::QLineF(const QPointF &apt1, const QPointF &apt2)
: pt1(apt1), pt2(apt2)
{
}
-inline QLineF::QLineF(qreal x1pos, qreal y1pos, qreal x2pos, qreal y2pos)
+Q_DECL_CONSTEXPR inline QLineF::QLineF(qreal x1pos, qreal y1pos, qreal x2pos, qreal y2pos)
: pt1(x1pos, y1pos), pt2(x2pos, y2pos)
{
}
-inline qreal QLineF::x1() const
+Q_DECL_CONSTEXPR inline qreal QLineF::x1() const
{
return pt1.x();
}
-inline qreal QLineF::y1() const
+Q_DECL_CONSTEXPR inline qreal QLineF::y1() const
{
return pt1.y();
}
-inline qreal QLineF::x2() const
+Q_DECL_CONSTEXPR inline qreal QLineF::x2() const
{
return pt2.x();
}
-inline qreal QLineF::y2() const
+Q_DECL_CONSTEXPR inline qreal QLineF::y2() const
{
return pt2.y();
}
-inline bool QLineF::isNull() const
+Q_DECL_CONSTEXPR inline bool QLineF::isNull() const
{
return qFuzzyCompare(pt1.x(), pt2.x()) && qFuzzyCompare(pt1.y(), pt2.y());
}
-inline QPointF QLineF::p1() const
+Q_DECL_CONSTEXPR inline QPointF QLineF::p1() const
{
return pt1;
}
-inline QPointF QLineF::p2() const
+Q_DECL_CONSTEXPR inline QPointF QLineF::p2() const
{
return pt2;
}
-inline qreal QLineF::dx() const
+Q_DECL_CONSTEXPR inline qreal QLineF::dx() const
{
return pt2.x() - pt1.x();
}
-inline qreal QLineF::dy() const
+Q_DECL_CONSTEXPR inline qreal QLineF::dy() const
{
return pt2.y() - pt1.y();
}
-inline QLineF QLineF::normalVector() const
+Q_DECL_CONSTEXPR inline QLineF QLineF::normalVector() const
{
return QLineF(p1(), p1() + QPointF(dy(), -dx()));
}
@@ -351,12 +351,12 @@ inline void QLineF::translate(qreal adx, qreal ady)
this->translate(QPointF(adx, ady));
}
-inline QLineF QLineF::translated(const QPointF &p) const
+Q_DECL_CONSTEXPR inline QLineF QLineF::translated(const QPointF &p) const
{
return QLineF(pt1 + p, pt2 + p);
}
-inline QLineF QLineF::translated(qreal adx, qreal ady) const
+Q_DECL_CONSTEXPR inline QLineF QLineF::translated(qreal adx, qreal ady) const
{
return translated(QPointF(adx, ady));
}
@@ -369,14 +369,12 @@ inline void QLineF::setLength(qreal len)
pt2 = QPointF(pt1.x() + v.dx() * len, pt1.y() + v.dy() * len);
}
-inline QPointF QLineF::pointAt(qreal t) const
+Q_DECL_CONSTEXPR inline QPointF QLineF::pointAt(qreal t) const
{
- qreal vx = pt2.x() - pt1.x();
- qreal vy = pt2.y() - pt1.y();
- return QPointF(pt1.x() + vx * t, pt1.y() + vy * t);
+ return QPointF(pt1.x() + (pt2.x() - pt1.x()) * t, pt1.y() + (pt2.y() - pt1.y()) * t);
}
-inline QLine QLineF::toLine() const
+Q_DECL_CONSTEXPR inline QLine QLineF::toLine() const
{
return QLine(pt1.toPoint(), pt2.toPoint());
}
@@ -405,7 +403,7 @@ inline void QLineF::setLine(qreal aX1, qreal aY1, qreal aX2, qreal aY2)
}
-inline bool QLineF::operator==(const QLineF &d) const
+Q_DECL_CONSTEXPR inline bool QLineF::operator==(const QLineF &d) const
{
return pt1 == d.pt1 && pt2 == d.pt2;
}
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index da3bae5f6c..08dedb4e94 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -402,7 +402,7 @@ Q_INLINE_TEMPLATE void QList<T>::node_copy(Node *from, Node *to, Node *src)
}
} else {
if (src != from && to - from > 0)
- memcpy(from, src, (to - from) * sizeof(Node *));
+ memcpy(from, src, (to - from) * sizeof(Node));
}
}
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 6c52eb3827..31f776dc2e 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -2797,7 +2797,7 @@ bool QLocalePrivate::numberToCLocale(const QString &num,
return false;
while (idx < l) {
- const QChar &in = uc[idx];
+ const QChar in = uc[idx];
char out = digitToCLocale(in);
if (out == 0) {
diff --git a/src/corelib/tools/qlocale.qdoc b/src/corelib/tools/qlocale.qdoc
index 2fff58333d..3a386c17d6 100644
--- a/src/corelib/tools/qlocale.qdoc
+++ b/src/corelib/tools/qlocale.qdoc
@@ -89,7 +89,7 @@
pair; it does not use the system locale database.
\note For the current keyboard input locale take a look at
- QInputPanel::locale().
+ QInputMethod::locale().
QLocale's data is based on Common Locale Data Repository v1.8.1.
@@ -114,7 +114,7 @@
California, Berkeley and its contributors.
\sa QString::arg(), QString::toInt(), QString::toDouble(),
- QInputPanel::locale()
+ QInputMethod::locale()
*/
/*!
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index 7653f4d93d..c6902ca206 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -228,7 +228,7 @@ public:
bool numberToCLocale(const QString &num,
GroupSeparatorMode group_sep_mode,
CharBuff *result) const;
- inline char digitToCLocale(const QChar &c) const;
+ inline char digitToCLocale(QChar c) const;
static void updateSystemPrivate();
@@ -282,7 +282,7 @@ public:
};
-inline char QLocalePrivate::digitToCLocale(const QChar &in) const
+inline char QLocalePrivate::digitToCLocale(QChar in) const
{
const QChar _zero = zero();
const QChar _group = group();
diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp
index cd9fffc7a5..e787f2fa2a 100644
--- a/src/corelib/tools/qlocale_win.cpp
+++ b/src/corelib/tools/qlocale_win.cpp
@@ -525,7 +525,7 @@ QVariant QSystemLocalePrivate::toCurrencyString(const QSystemLocale::CurrencyToS
QVariant QSystemLocalePrivate::uiLanguages()
{
if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA) {
- typedef BOOL (*GetUserPreferredUILanguagesFunc) (
+ typedef BOOL (WINAPI *GetUserPreferredUILanguagesFunc) (
DWORD dwFlags,
PULONG pulNumLanguages,
PWSTR pwszLanguagesBuffer,
diff --git a/src/corelib/tools/qmargins.h b/src/corelib/tools/qmargins.h
index 7d9d07ed46..d3551fa195 100644
--- a/src/corelib/tools/qmargins.h
+++ b/src/corelib/tools/qmargins.h
@@ -52,15 +52,15 @@ QT_BEGIN_NAMESPACE
class QMargins
{
public:
- QMargins();
- QMargins(int left, int top, int right, int bottom);
+ Q_DECL_CONSTEXPR QMargins();
+ Q_DECL_CONSTEXPR QMargins(int left, int top, int right, int bottom);
- bool isNull() const;
+ Q_DECL_CONSTEXPR bool isNull() const;
- int left() const;
- int top() const;
- int right() const;
- int bottom() const;
+ Q_DECL_CONSTEXPR int left() const;
+ Q_DECL_CONSTEXPR int top() const;
+ Q_DECL_CONSTEXPR int right() const;
+ Q_DECL_CONSTEXPR int bottom() const;
void setLeft(int left);
void setTop(int top);
@@ -73,8 +73,8 @@ private:
int m_right;
int m_bottom;
- friend inline bool operator==(const QMargins &, const QMargins &);
- friend inline bool operator!=(const QMargins &, const QMargins &);
+ friend Q_DECL_CONSTEXPR inline bool operator==(const QMargins &, const QMargins &);
+ friend Q_DECL_CONSTEXPR inline bool operator!=(const QMargins &, const QMargins &);
};
Q_DECLARE_TYPEINFO(QMargins, Q_MOVABLE_TYPE);
@@ -91,25 +91,24 @@ Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QMargins &);
QMargins inline functions
*****************************************************************************/
-inline QMargins::QMargins()
-{ m_top = m_bottom = m_left = m_right = 0; }
+Q_DECL_CONSTEXPR inline QMargins::QMargins() : m_left(0), m_top(0), m_right(0), m_bottom(0) {}
-inline QMargins::QMargins(int aleft, int atop, int aright, int abottom)
+Q_DECL_CONSTEXPR inline QMargins::QMargins(int aleft, int atop, int aright, int abottom)
: m_left(aleft), m_top(atop), m_right(aright), m_bottom(abottom) {}
-inline bool QMargins::isNull() const
+Q_DECL_CONSTEXPR inline bool QMargins::isNull() const
{ return m_left==0 && m_top==0 && m_right==0 && m_bottom==0; }
-inline int QMargins::left() const
+Q_DECL_CONSTEXPR inline int QMargins::left() const
{ return m_left; }
-inline int QMargins::top() const
+Q_DECL_CONSTEXPR inline int QMargins::top() const
{ return m_top; }
-inline int QMargins::right() const
+Q_DECL_CONSTEXPR inline int QMargins::right() const
{ return m_right; }
-inline int QMargins::bottom() const
+Q_DECL_CONSTEXPR inline int QMargins::bottom() const
{ return m_bottom; }
@@ -125,7 +124,7 @@ inline void QMargins::setRight(int aright)
inline void QMargins::setBottom(int abottom)
{ m_bottom = abottom; }
-inline bool operator==(const QMargins &m1, const QMargins &m2)
+Q_DECL_CONSTEXPR inline bool operator==(const QMargins &m1, const QMargins &m2)
{
return
m1.m_left == m2.m_left &&
@@ -134,7 +133,7 @@ inline bool operator==(const QMargins &m1, const QMargins &m2)
m1.m_bottom == m2.m_bottom;
}
-inline bool operator!=(const QMargins &m1, const QMargins &m2)
+Q_DECL_CONSTEXPR inline bool operator!=(const QMargins &m1, const QMargins &m2)
{
return
m1.m_left != m2.m_left ||
diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h
index 2e987fcf41..0eb22807e8 100644
--- a/src/corelib/tools/qpoint.h
+++ b/src/corelib/tools/qpoint.h
@@ -52,17 +52,17 @@ QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QPoint
{
public:
- QPoint();
- QPoint(int xpos, int ypos);
+ Q_DECL_CONSTEXPR QPoint();
+ Q_DECL_CONSTEXPR QPoint(int xpos, int ypos);
- bool isNull() const;
+ Q_DECL_CONSTEXPR bool isNull() const;
- int x() const;
- int y() const;
+ Q_DECL_CONSTEXPR int x() const;
+ Q_DECL_CONSTEXPR int y() const;
void setX(int x);
void setY(int y);
- int manhattanLength() const;
+ Q_DECL_CONSTEXPR int manhattanLength() const;
int &rx();
int &ry();
@@ -76,18 +76,18 @@ public:
QPoint &operator/=(qreal c);
- friend inline bool operator==(const QPoint &, const QPoint &);
- friend inline bool operator!=(const QPoint &, const QPoint &);
- friend inline const QPoint operator+(const QPoint &, const QPoint &);
- friend inline const QPoint operator-(const QPoint &, const QPoint &);
- friend inline const QPoint operator*(const QPoint &, float);
- friend inline const QPoint operator*(float, const QPoint &);
- friend inline const QPoint operator*(const QPoint &, double);
- friend inline const QPoint operator*(double, const QPoint &);
- friend inline const QPoint operator*(const QPoint &, int);
- friend inline const QPoint operator*(int, const QPoint &);
- friend inline const QPoint operator-(const QPoint &);
- friend inline const QPoint operator/(const QPoint &, qreal);
+ friend Q_DECL_CONSTEXPR inline bool operator==(const QPoint &, const QPoint &);
+ friend Q_DECL_CONSTEXPR inline bool operator!=(const QPoint &, const QPoint &);
+ friend Q_DECL_CONSTEXPR inline const QPoint operator+(const QPoint &, const QPoint &);
+ friend Q_DECL_CONSTEXPR inline const QPoint operator-(const QPoint &, const QPoint &);
+ friend Q_DECL_CONSTEXPR inline const QPoint operator*(const QPoint &, float);
+ friend Q_DECL_CONSTEXPR inline const QPoint operator*(float, const QPoint &);
+ friend Q_DECL_CONSTEXPR inline const QPoint operator*(const QPoint &, double);
+ friend Q_DECL_CONSTEXPR inline const QPoint operator*(double, const QPoint &);
+ friend Q_DECL_CONSTEXPR inline const QPoint operator*(const QPoint &, int);
+ friend Q_DECL_CONSTEXPR inline const QPoint operator*(int, const QPoint &);
+ friend Q_DECL_CONSTEXPR inline const QPoint operator-(const QPoint &);
+ friend Q_DECL_CONSTEXPR inline const QPoint operator/(const QPoint &, qreal);
private:
friend class QTransform;
@@ -109,19 +109,17 @@ Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QPoint &);
QPoint inline functions
*****************************************************************************/
-inline QPoint::QPoint()
-{ xp=0; yp=0; }
+Q_DECL_CONSTEXPR inline QPoint::QPoint() : xp(0), yp(0) {}
-inline QPoint::QPoint(int xpos, int ypos)
-{ xp = xpos; yp = ypos; }
+Q_DECL_CONSTEXPR inline QPoint::QPoint(int xpos, int ypos) : xp(xpos), yp(ypos) {}
-inline bool QPoint::isNull() const
+Q_DECL_CONSTEXPR inline bool QPoint::isNull() const
{ return xp == 0 && yp == 0; }
-inline int QPoint::x() const
+Q_DECL_CONSTEXPR inline int QPoint::x() const
{ return xp; }
-inline int QPoint::y() const
+Q_DECL_CONSTEXPR inline int QPoint::y() const
{ return yp; }
inline void QPoint::setX(int xpos)
@@ -130,7 +128,7 @@ inline void QPoint::setX(int xpos)
inline void QPoint::setY(int ypos)
{ yp = ypos; }
-inline int QPoint::manhattanLength() const
+inline int Q_DECL_CONSTEXPR QPoint::manhattanLength() const
{ return qAbs(x())+qAbs(y()); }
inline int &QPoint::rx()
@@ -154,37 +152,37 @@ inline QPoint &QPoint::operator*=(double c)
inline QPoint &QPoint::operator*=(int c)
{ xp = xp*c; yp = yp*c; return *this; }
-inline bool operator==(const QPoint &p1, const QPoint &p2)
+Q_DECL_CONSTEXPR inline bool operator==(const QPoint &p1, const QPoint &p2)
{ return p1.xp == p2.xp && p1.yp == p2.yp; }
-inline bool operator!=(const QPoint &p1, const QPoint &p2)
+Q_DECL_CONSTEXPR inline bool operator!=(const QPoint &p1, const QPoint &p2)
{ return p1.xp != p2.xp || p1.yp != p2.yp; }
-inline const QPoint operator+(const QPoint &p1, const QPoint &p2)
+Q_DECL_CONSTEXPR inline const QPoint operator+(const QPoint &p1, const QPoint &p2)
{ return QPoint(p1.xp+p2.xp, p1.yp+p2.yp); }
-inline const QPoint operator-(const QPoint &p1, const QPoint &p2)
+Q_DECL_CONSTEXPR inline const QPoint operator-(const QPoint &p1, const QPoint &p2)
{ return QPoint(p1.xp-p2.xp, p1.yp-p2.yp); }
-inline const QPoint operator*(const QPoint &p, float c)
+Q_DECL_CONSTEXPR inline const QPoint operator*(const QPoint &p, float c)
{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
-inline const QPoint operator*(const QPoint &p, double c)
+Q_DECL_CONSTEXPR inline const QPoint operator*(const QPoint &p, double c)
{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
-inline const QPoint operator*(const QPoint &p, int c)
+Q_DECL_CONSTEXPR inline const QPoint operator*(const QPoint &p, int c)
{ return QPoint(p.xp*c, p.yp*c); }
-inline const QPoint operator*(float c, const QPoint &p)
+Q_DECL_CONSTEXPR inline const QPoint operator*(float c, const QPoint &p)
{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
-inline const QPoint operator*(double c, const QPoint &p)
+Q_DECL_CONSTEXPR inline const QPoint operator*(double c, const QPoint &p)
{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
-inline const QPoint operator*(int c, const QPoint &p)
+Q_DECL_CONSTEXPR inline const QPoint operator*(int c, const QPoint &p)
{ return QPoint(p.xp*c, p.yp*c); }
-inline const QPoint operator-(const QPoint &p)
+Q_DECL_CONSTEXPR inline const QPoint operator-(const QPoint &p)
{ return QPoint(-p.xp, -p.yp); }
inline QPoint &QPoint::operator/=(qreal c)
@@ -194,7 +192,7 @@ inline QPoint &QPoint::operator/=(qreal c)
return *this;
}
-inline const QPoint operator/(const QPoint &p, qreal c)
+Q_DECL_CONSTEXPR inline const QPoint operator/(const QPoint &p, qreal c)
{
return QPoint(qRound(p.xp/c), qRound(p.yp/c));
}
@@ -210,16 +208,16 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, const QPoint &);
class Q_CORE_EXPORT QPointF
{
public:
- QPointF();
- QPointF(const QPoint &p);
- QPointF(qreal xpos, qreal ypos);
+ Q_DECL_CONSTEXPR QPointF();
+ Q_DECL_CONSTEXPR QPointF(const QPoint &p);
+ Q_DECL_CONSTEXPR QPointF(qreal xpos, qreal ypos);
- qreal manhattanLength() const;
+ Q_DECL_CONSTEXPR qreal manhattanLength() const;
bool isNull() const;
- qreal x() const;
- qreal y() const;
+ Q_DECL_CONSTEXPR qreal x() const;
+ Q_DECL_CONSTEXPR qreal y() const;
void setX(qreal x);
void setY(qreal y);
@@ -231,16 +229,16 @@ public:
QPointF &operator*=(qreal c);
QPointF &operator/=(qreal c);
- friend inline bool operator==(const QPointF &, const QPointF &);
- friend inline bool operator!=(const QPointF &, const QPointF &);
- friend inline const QPointF operator+(const QPointF &, const QPointF &);
- friend inline const QPointF operator-(const QPointF &, const QPointF &);
- friend inline const QPointF operator*(qreal, const QPointF &);
- friend inline const QPointF operator*(const QPointF &, qreal);
- friend inline const QPointF operator-(const QPointF &);
- friend inline const QPointF operator/(const QPointF &, qreal);
+ friend Q_DECL_CONSTEXPR inline bool operator==(const QPointF &, const QPointF &);
+ friend Q_DECL_CONSTEXPR inline bool operator!=(const QPointF &, const QPointF &);
+ friend Q_DECL_CONSTEXPR inline const QPointF operator+(const QPointF &, const QPointF &);
+ friend Q_DECL_CONSTEXPR inline const QPointF operator-(const QPointF &, const QPointF &);
+ friend Q_DECL_CONSTEXPR inline const QPointF operator*(qreal, const QPointF &);
+ friend Q_DECL_CONSTEXPR inline const QPointF operator*(const QPointF &, qreal);
+ friend Q_DECL_CONSTEXPR inline const QPointF operator-(const QPointF &);
+ friend Q_DECL_CONSTEXPR inline const QPointF operator/(const QPointF &, qreal);
- QPoint toPoint() const;
+ Q_DECL_CONSTEXPR QPoint toPoint() const;
private:
friend class QMatrix;
@@ -264,13 +262,13 @@ Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QPointF &);
QPointF inline functions
*****************************************************************************/
-inline QPointF::QPointF() : xp(0), yp(0) { }
+Q_DECL_CONSTEXPR inline QPointF::QPointF() : xp(0), yp(0) { }
-inline QPointF::QPointF(qreal xpos, qreal ypos) : xp(xpos), yp(ypos) { }
+Q_DECL_CONSTEXPR inline QPointF::QPointF(qreal xpos, qreal ypos) : xp(xpos), yp(ypos) { }
-inline QPointF::QPointF(const QPoint &p) : xp(p.x()), yp(p.y()) { }
+Q_DECL_CONSTEXPR inline QPointF::QPointF(const QPoint &p) : xp(p.x()), yp(p.y()) { }
-inline qreal QPointF::manhattanLength() const
+Q_DECL_CONSTEXPR inline qreal QPointF::manhattanLength() const
{
return qAbs(x())+qAbs(y());
}
@@ -280,12 +278,12 @@ inline bool QPointF::isNull() const
return qIsNull(xp) && qIsNull(yp);
}
-inline qreal QPointF::x() const
+Q_DECL_CONSTEXPR inline qreal QPointF::x() const
{
return xp;
}
-inline qreal QPointF::y() const
+Q_DECL_CONSTEXPR inline qreal QPointF::y() const
{
return yp;
}
@@ -327,37 +325,37 @@ inline QPointF &QPointF::operator*=(qreal c)
xp*=c; yp*=c; return *this;
}
-inline bool operator==(const QPointF &p1, const QPointF &p2)
+Q_DECL_CONSTEXPR inline bool operator==(const QPointF &p1, const QPointF &p2)
{
return qFuzzyIsNull(p1.xp - p2.xp) && qFuzzyIsNull(p1.yp - p2.yp);
}
-inline bool operator!=(const QPointF &p1, const QPointF &p2)
+Q_DECL_CONSTEXPR inline bool operator!=(const QPointF &p1, const QPointF &p2)
{
return !qFuzzyIsNull(p1.xp - p2.xp) || !qFuzzyIsNull(p1.yp - p2.yp);
}
-inline const QPointF operator+(const QPointF &p1, const QPointF &p2)
+Q_DECL_CONSTEXPR inline const QPointF operator+(const QPointF &p1, const QPointF &p2)
{
return QPointF(p1.xp+p2.xp, p1.yp+p2.yp);
}
-inline const QPointF operator-(const QPointF &p1, const QPointF &p2)
+Q_DECL_CONSTEXPR inline const QPointF operator-(const QPointF &p1, const QPointF &p2)
{
return QPointF(p1.xp-p2.xp, p1.yp-p2.yp);
}
-inline const QPointF operator*(const QPointF &p, qreal c)
+Q_DECL_CONSTEXPR inline const QPointF operator*(const QPointF &p, qreal c)
{
return QPointF(p.xp*c, p.yp*c);
}
-inline const QPointF operator*(qreal c, const QPointF &p)
+Q_DECL_CONSTEXPR inline const QPointF operator*(qreal c, const QPointF &p)
{
return QPointF(p.xp*c, p.yp*c);
}
-inline const QPointF operator-(const QPointF &p)
+Q_DECL_CONSTEXPR inline const QPointF operator-(const QPointF &p)
{
return QPointF(-p.xp, -p.yp);
}
@@ -369,12 +367,12 @@ inline QPointF &QPointF::operator/=(qreal c)
return *this;
}
-inline const QPointF operator/(const QPointF &p, qreal c)
+Q_DECL_CONSTEXPR inline const QPointF operator/(const QPointF &p, qreal c)
{
return QPointF(p.xp/c, p.yp/c);
}
-inline QPoint QPointF::toPoint() const
+Q_DECL_CONSTEXPR inline QPoint QPointF::toPoint() const
{
return QPoint(qRound(xp), qRound(yp));
}
diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h
index bc9a4d68be..4bf10061ab 100644
--- a/src/corelib/tools/qrect.h
+++ b/src/corelib/tools/qrect.h
@@ -57,23 +57,23 @@ QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QRect
{
public:
- QRect() { x1 = y1 = 0; x2 = y2 = -1; }
- QRect(const QPoint &topleft, const QPoint &bottomright);
- QRect(const QPoint &topleft, const QSize &size);
- QRect(int left, int top, int width, int height);
-
- bool isNull() const;
- bool isEmpty() const;
- bool isValid() const;
-
- int left() const;
- int top() const;
- int right() const;
- int bottom() const;
+ Q_DECL_CONSTEXPR QRect() : x1(0), y1(0), x2(-1), y2(-1) {}
+ Q_DECL_CONSTEXPR QRect(const QPoint &topleft, const QPoint &bottomright);
+ Q_DECL_CONSTEXPR QRect(const QPoint &topleft, const QSize &size);
+ Q_DECL_CONSTEXPR QRect(int left, int top, int width, int height);
+
+ Q_DECL_CONSTEXPR bool isNull() const;
+ Q_DECL_CONSTEXPR bool isEmpty() const;
+ Q_DECL_CONSTEXPR bool isValid() const;
+
+ Q_DECL_CONSTEXPR int left() const;
+ Q_DECL_CONSTEXPR int top() const;
+ Q_DECL_CONSTEXPR int right() const;
+ Q_DECL_CONSTEXPR int bottom() const;
QRect normalized() const;
- int x() const;
- int y() const;
+ Q_DECL_CONSTEXPR int x() const;
+ Q_DECL_CONSTEXPR int y() const;
void setLeft(int pos);
void setTop(int pos);
void setRight(int pos);
@@ -86,11 +86,11 @@ public:
void setTopRight(const QPoint &p);
void setBottomLeft(const QPoint &p);
- QPoint topLeft() const;
- QPoint bottomRight() const;
- QPoint topRight() const;
- QPoint bottomLeft() const;
- QPoint center() const;
+ Q_DECL_CONSTEXPR QPoint topLeft() const;
+ Q_DECL_CONSTEXPR QPoint bottomRight() const;
+ Q_DECL_CONSTEXPR QPoint topRight() const;
+ Q_DECL_CONSTEXPR QPoint bottomLeft() const;
+ Q_DECL_CONSTEXPR QPoint center() const;
void moveLeft(int pos);
void moveTop(int pos);
@@ -104,8 +104,8 @@ public:
inline void translate(int dx, int dy);
inline void translate(const QPoint &p);
- inline QRect translated(int dx, int dy) const;
- inline QRect translated(const QPoint &p) const;
+ Q_DECL_CONSTEXPR inline QRect translated(int dx, int dy) const;
+ Q_DECL_CONSTEXPR inline QRect translated(const QPoint &p) const;
void moveTo(int x, int t);
void moveTo(const QPoint &p);
@@ -117,11 +117,11 @@ public:
inline void getCoords(int *x1, int *y1, int *x2, int *y2) const;
inline void adjust(int x1, int y1, int x2, int y2);
- inline QRect adjusted(int x1, int y1, int x2, int y2) const;
+ Q_DECL_CONSTEXPR inline QRect adjusted(int x1, int y1, int x2, int y2) const;
- QSize size() const;
- int width() const;
- int height() const;
+ Q_DECL_CONSTEXPR QSize size() const;
+ Q_DECL_CONSTEXPR int width() const;
+ Q_DECL_CONSTEXPR int height() const;
void setWidth(int w);
void setHeight(int h);
void setSize(const QSize &s);
@@ -144,8 +144,8 @@ public:
QT_DEPRECATED QRect intersect(const QRect &r) const { return intersected(r); }
#endif
- friend Q_CORE_EXPORT_INLINE bool operator==(const QRect &, const QRect &);
- friend Q_CORE_EXPORT_INLINE bool operator!=(const QRect &, const QRect &);
+ friend Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator==(const QRect &, const QRect &);
+ friend Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator!=(const QRect &, const QRect &);
private:
int x1;
@@ -155,8 +155,8 @@ private:
};
Q_DECLARE_TYPEINFO(QRect, Q_MOVABLE_TYPE);
-Q_CORE_EXPORT_INLINE bool operator==(const QRect &, const QRect &);
-Q_CORE_EXPORT_INLINE bool operator!=(const QRect &, const QRect &);
+Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator==(const QRect &, const QRect &);
+Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator!=(const QRect &, const QRect &);
/*****************************************************************************
@@ -171,55 +171,40 @@ Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QRect &);
QRect inline member functions
*****************************************************************************/
-inline QRect::QRect(int aleft, int atop, int awidth, int aheight)
-{
- x1 = aleft;
- y1 = atop;
- x2 = (aleft + awidth - 1);
- y2 = (atop + aheight - 1);
-}
+Q_DECL_CONSTEXPR inline QRect::QRect(int aleft, int atop, int awidth, int aheight)
+ : x1(aleft), y1(atop), x2(aleft + awidth - 1), y2(atop + aheight - 1) {}
-inline QRect::QRect(const QPoint &atopLeft, const QPoint &abottomRight)
-{
- x1 = atopLeft.x();
- y1 = atopLeft.y();
- x2 = abottomRight.x();
- y2 = abottomRight.y();
-}
+Q_DECL_CONSTEXPR inline QRect::QRect(const QPoint &atopLeft, const QPoint &abottomRight)
+ : x1(atopLeft.x()), y1(atopLeft.y()), x2(abottomRight.x()), y2(abottomRight.y()) {}
-inline QRect::QRect(const QPoint &atopLeft, const QSize &asize)
-{
- x1 = atopLeft.x();
- y1 = atopLeft.y();
- x2 = (x1+asize.width() - 1);
- y2 = (y1+asize.height() - 1);
-}
+Q_DECL_CONSTEXPR inline QRect::QRect(const QPoint &atopLeft, const QSize &asize)
+ : x1(atopLeft.x()), y1(atopLeft.y()), x2(atopLeft.x()+asize.width() - 1), y2(atopLeft.y()+asize.height() - 1) {}
-inline bool QRect::isNull() const
+Q_DECL_CONSTEXPR inline bool QRect::isNull() const
{ return x2 == x1 - 1 && y2 == y1 - 1; }
-inline bool QRect::isEmpty() const
+Q_DECL_CONSTEXPR inline bool QRect::isEmpty() const
{ return x1 > x2 || y1 > y2; }
-inline bool QRect::isValid() const
+Q_DECL_CONSTEXPR inline bool QRect::isValid() const
{ return x1 <= x2 && y1 <= y2; }
-inline int QRect::left() const
+Q_DECL_CONSTEXPR inline int QRect::left() const
{ return x1; }
-inline int QRect::top() const
+Q_DECL_CONSTEXPR inline int QRect::top() const
{ return y1; }
-inline int QRect::right() const
+Q_DECL_CONSTEXPR inline int QRect::right() const
{ return x2; }
-inline int QRect::bottom() const
+Q_DECL_CONSTEXPR inline int QRect::bottom() const
{ return y2; }
-inline int QRect::x() const
+Q_DECL_CONSTEXPR inline int QRect::x() const
{ return x1; }
-inline int QRect::y() const
+Q_DECL_CONSTEXPR inline int QRect::y() const
{ return y1; }
inline void QRect::setLeft(int pos)
@@ -252,28 +237,28 @@ inline void QRect::setX(int ax)
inline void QRect::setY(int ay)
{ y1 = ay; }
-inline QPoint QRect::topLeft() const
+Q_DECL_CONSTEXPR inline QPoint QRect::topLeft() const
{ return QPoint(x1, y1); }
-inline QPoint QRect::bottomRight() const
+Q_DECL_CONSTEXPR inline QPoint QRect::bottomRight() const
{ return QPoint(x2, y2); }
-inline QPoint QRect::topRight() const
+Q_DECL_CONSTEXPR inline QPoint QRect::topRight() const
{ return QPoint(x2, y1); }
-inline QPoint QRect::bottomLeft() const
+Q_DECL_CONSTEXPR inline QPoint QRect::bottomLeft() const
{ return QPoint(x1, y2); }
-inline QPoint QRect::center() const
+Q_DECL_CONSTEXPR inline QPoint QRect::center() const
{ return QPoint((x1+x2)/2, (y1+y2)/2); }
-inline int QRect::width() const
+Q_DECL_CONSTEXPR inline int QRect::width() const
{ return x2 - x1 + 1; }
-inline int QRect::height() const
+Q_DECL_CONSTEXPR inline int QRect::height() const
{ return y2 - y1 + 1; }
-inline QSize QRect::size() const
+Q_DECL_CONSTEXPR inline QSize QRect::size() const
{ return QSize(width(), height()); }
inline void QRect::translate(int dx, int dy)
@@ -292,10 +277,10 @@ inline void QRect::translate(const QPoint &p)
y2 += p.y();
}
-inline QRect QRect::translated(int dx, int dy) const
+Q_DECL_CONSTEXPR inline QRect QRect::translated(int dx, int dy) const
{ return QRect(QPoint(x1 + dx, y1 + dy), QPoint(x2 + dx, y2 + dy)); }
-inline QRect QRect::translated(const QPoint &p) const
+Q_DECL_CONSTEXPR inline QRect QRect::translated(const QPoint &p) const
{ return QRect(QPoint(x1 + p.x(), y1 + p.y()), QPoint(x2 + p.x(), y2 + p.y())); }
inline void QRect::moveTo(int ax, int ay)
@@ -388,7 +373,7 @@ inline void QRect::setCoords(int xp1, int yp1, int xp2, int yp2)
y2 = yp2;
}
-inline QRect QRect::adjusted(int xp1, int yp1, int xp2, int yp2) const
+Q_DECL_CONSTEXPR inline QRect QRect::adjusted(int xp1, int yp1, int xp2, int yp2) const
{ return QRect(QPoint(x1 + xp1, y1 + yp1), QPoint(x2 + xp2, y2 + yp2)); }
inline void QRect::adjust(int dx1, int dy1, int dx2, int dy2)
@@ -443,12 +428,12 @@ inline QRect QRect::united(const QRect &r) const
return *this | r;
}
-inline bool operator==(const QRect &r1, const QRect &r2)
+Q_DECL_CONSTEXPR inline bool operator==(const QRect &r1, const QRect &r2)
{
return r1.x1==r2.x1 && r1.x2==r2.x2 && r1.y1==r2.y1 && r1.y2==r2.y2;
}
-inline bool operator!=(const QRect &r1, const QRect &r2)
+Q_DECL_CONSTEXPR inline bool operator!=(const QRect &r1, const QRect &r2)
{
return r1.x1!=r2.x1 || r1.x2!=r2.x2 || r1.y1!=r2.y1 || r1.y2!=r2.y2;
}
@@ -461,24 +446,24 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, const QRect &);
class Q_CORE_EXPORT QRectF
{
public:
- QRectF() { xp = yp = 0.; w = h = 0.; }
- QRectF(const QPointF &topleft, const QSizeF &size);
- QRectF(const QPointF &topleft, const QPointF &bottomRight);
- QRectF(qreal left, qreal top, qreal width, qreal height);
- QRectF(const QRect &rect);
-
- bool isNull() const;
- bool isEmpty() const;
- bool isValid() const;
+ Q_DECL_CONSTEXPR QRectF() : xp(0.), yp(0.), w(0.), h(0.) {}
+ Q_DECL_CONSTEXPR QRectF(const QPointF &topleft, const QSizeF &size);
+ Q_DECL_CONSTEXPR QRectF(const QPointF &topleft, const QPointF &bottomRight);
+ Q_DECL_CONSTEXPR QRectF(qreal left, qreal top, qreal width, qreal height);
+ Q_DECL_CONSTEXPR QRectF(const QRect &rect);
+
+ Q_DECL_CONSTEXPR bool isNull() const;
+ Q_DECL_CONSTEXPR bool isEmpty() const;
+ Q_DECL_CONSTEXPR bool isValid() const;
QRectF normalized() const;
- inline qreal left() const { return xp; }
- inline qreal top() const { return yp; }
- inline qreal right() const { return xp + w; }
- inline qreal bottom() const { return yp + h; }
+ Q_DECL_CONSTEXPR inline qreal left() const { return xp; }
+ Q_DECL_CONSTEXPR inline qreal top() const { return yp; }
+ Q_DECL_CONSTEXPR inline qreal right() const { return xp + w; }
+ Q_DECL_CONSTEXPR inline qreal bottom() const { return yp + h; }
- inline qreal x() const;
- inline qreal y() const;
+ Q_DECL_CONSTEXPR inline qreal x() const;
+ Q_DECL_CONSTEXPR inline qreal y() const;
inline void setLeft(qreal pos);
inline void setTop(qreal pos);
inline void setRight(qreal pos);
@@ -486,11 +471,11 @@ public:
inline void setX(qreal pos) { setLeft(pos); }
inline void setY(qreal pos) { setTop(pos); }
- inline QPointF topLeft() const { return QPointF(xp, yp); }
- inline QPointF bottomRight() const { return QPointF(xp+w, yp+h); }
- inline QPointF topRight() const { return QPointF(xp+w, yp); }
- inline QPointF bottomLeft() const { return QPointF(xp, yp+h); }
- inline QPointF center() const;
+ Q_DECL_CONSTEXPR inline QPointF topLeft() const { return QPointF(xp, yp); }
+ Q_DECL_CONSTEXPR inline QPointF bottomRight() const { return QPointF(xp+w, yp+h); }
+ Q_DECL_CONSTEXPR inline QPointF topRight() const { return QPointF(xp+w, yp); }
+ Q_DECL_CONSTEXPR inline QPointF bottomLeft() const { return QPointF(xp, yp+h); }
+ Q_DECL_CONSTEXPR inline QPointF center() const;
void setTopLeft(const QPointF &p);
void setBottomRight(const QPointF &p);
@@ -510,8 +495,8 @@ public:
void translate(qreal dx, qreal dy);
void translate(const QPointF &p);
- QRectF translated(qreal dx, qreal dy) const;
- QRectF translated(const QPointF &p) const;
+ Q_DECL_CONSTEXPR QRectF translated(qreal dx, qreal dy) const;
+ Q_DECL_CONSTEXPR QRectF translated(const QPointF &p) const;
void moveTo(qreal x, qreal t);
void moveTo(const QPointF &p);
@@ -523,11 +508,11 @@ public:
void getCoords(qreal *x1, qreal *y1, qreal *x2, qreal *y2) const;
inline void adjust(qreal x1, qreal y1, qreal x2, qreal y2);
- inline QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const;
+ Q_DECL_CONSTEXPR inline QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const;
- QSizeF size() const;
- qreal width() const;
- qreal height() const;
+ Q_DECL_CONSTEXPR QSizeF size() const;
+ Q_DECL_CONSTEXPR qreal width() const;
+ Q_DECL_CONSTEXPR qreal height() const;
void setWidth(qreal w);
void setHeight(qreal h);
void setSize(const QSizeF &s);
@@ -549,10 +534,10 @@ public:
QT_DEPRECATED QRectF intersect(const QRectF &r) const { return intersected(r); }
#endif
- friend Q_CORE_EXPORT_INLINE bool operator==(const QRectF &, const QRectF &);
- friend Q_CORE_EXPORT_INLINE bool operator!=(const QRectF &, const QRectF &);
+ friend Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator==(const QRectF &, const QRectF &);
+ friend Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator!=(const QRectF &, const QRectF &);
- QRect toRect() const;
+ Q_DECL_CONSTEXPR QRect toRect() const;
QRect toAlignedRect() const;
private:
@@ -563,8 +548,8 @@ private:
};
Q_DECLARE_TYPEINFO(QRectF, Q_MOVABLE_TYPE);
-Q_CORE_EXPORT_INLINE bool operator==(const QRectF &, const QRectF &);
-Q_CORE_EXPORT_INLINE bool operator!=(const QRectF &, const QRectF &);
+Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator==(const QRectF &, const QRectF &);
+Q_CORE_EXPORT_INLINE Q_DECL_CONSTEXPR bool operator!=(const QRectF &, const QRectF &);
/*****************************************************************************
@@ -579,45 +564,40 @@ Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QRectF &);
QRectF inline member functions
*****************************************************************************/
-inline QRectF::QRectF(qreal aleft, qreal atop, qreal awidth, qreal aheight)
+Q_DECL_CONSTEXPR inline QRectF::QRectF(qreal aleft, qreal atop, qreal awidth, qreal aheight)
: xp(aleft), yp(atop), w(awidth), h(aheight)
{
}
-inline QRectF::QRectF(const QPointF &atopLeft, const QSizeF &asize)
+Q_DECL_CONSTEXPR inline QRectF::QRectF(const QPointF &atopLeft, const QSizeF &asize)
+ : xp(atopLeft.x()), yp(atopLeft.y()), w(asize.width()), h(asize.height())
{
- xp = atopLeft.x();
- yp = atopLeft.y();
- w = asize.width();
- h = asize.height();
}
-inline QRectF::QRectF(const QPointF &atopLeft, const QPointF &abottomRight)
+
+Q_DECL_CONSTEXPR inline QRectF::QRectF(const QPointF &atopLeft, const QPointF &abottomRight)
+ : xp(atopLeft.x()), yp(atopLeft.y()), w(abottomRight.x() - atopLeft.x()), h(abottomRight.y() - atopLeft.y())
{
- xp = atopLeft.x();
- yp = atopLeft.y();
- w = abottomRight.x() - xp;
- h = abottomRight.y() - yp;
}
-inline QRectF::QRectF(const QRect &r)
+Q_DECL_CONSTEXPR inline QRectF::QRectF(const QRect &r)
: xp(r.x()), yp(r.y()), w(r.width()), h(r.height())
{
}
-inline bool QRectF::isNull() const
+Q_DECL_CONSTEXPR inline bool QRectF::isNull() const
{ return w == 0. && h == 0.; }
-inline bool QRectF::isEmpty() const
+Q_DECL_CONSTEXPR inline bool QRectF::isEmpty() const
{ return w <= 0. || h <= 0.; }
-inline bool QRectF::isValid() const
+Q_DECL_CONSTEXPR inline bool QRectF::isValid() const
{ return w > 0. && h > 0.; }
-inline qreal QRectF::x() const
+Q_DECL_CONSTEXPR inline qreal QRectF::x() const
{ return xp; }
-inline qreal QRectF::y() const
+Q_DECL_CONSTEXPR inline qreal QRectF::y() const
{ return yp; }
inline void QRectF::setLeft(qreal pos) { qreal diff = pos - xp; xp += diff; w -= diff; }
@@ -636,7 +616,7 @@ inline void QRectF::setBottomLeft(const QPointF &p) { setLeft(p.x()); setBottom(
inline void QRectF::setBottomRight(const QPointF &p) { setRight(p.x()); setBottom(p.y()); }
-inline QPointF QRectF::center() const
+Q_DECL_CONSTEXPR inline QPointF QRectF::center() const
{ return QPointF(xp + w/2, yp + h/2); }
inline void QRectF::moveLeft(qreal pos) { xp = pos; }
@@ -657,13 +637,13 @@ inline void QRectF::moveBottomRight(const QPointF &p) { moveRight(p.x()); moveBo
inline void QRectF::moveCenter(const QPointF &p) { xp = p.x() - w/2; yp = p.y() - h/2; }
-inline qreal QRectF::width() const
+Q_DECL_CONSTEXPR inline qreal QRectF::width() const
{ return w; }
-inline qreal QRectF::height() const
+Q_DECL_CONSTEXPR inline qreal QRectF::height() const
{ return h; }
-inline QSizeF QRectF::size() const
+Q_DECL_CONSTEXPR inline QSizeF QRectF::size() const
{ return QSizeF(w, h); }
inline void QRectF::translate(qreal dx, qreal dy)
@@ -690,10 +670,10 @@ inline void QRectF::moveTo(const QPointF &p)
yp = p.y();
}
-inline QRectF QRectF::translated(qreal dx, qreal dy) const
+Q_DECL_CONSTEXPR inline QRectF QRectF::translated(qreal dx, qreal dy) const
{ return QRectF(xp + dx, yp + dy, w, h); }
-inline QRectF QRectF::translated(const QPointF &p) const
+Q_DECL_CONSTEXPR inline QRectF QRectF::translated(const QPointF &p) const
{ return QRectF(xp + p.x(), yp + p.y(), w, h); }
inline void QRectF::getRect(qreal *ax, qreal *ay, qreal *aaw, qreal *aah) const
@@ -731,7 +711,7 @@ inline void QRectF::setCoords(qreal xp1, qreal yp1, qreal xp2, qreal yp2)
inline void QRectF::adjust(qreal xp1, qreal yp1, qreal xp2, qreal yp2)
{ xp += xp1; yp += yp1; w += xp2 - xp1; h += yp2 - yp1; }
-inline QRectF QRectF::adjusted(qreal xp1, qreal yp1, qreal xp2, qreal yp2) const
+Q_DECL_CONSTEXPR inline QRectF QRectF::adjusted(qreal xp1, qreal yp1, qreal xp2, qreal yp2) const
{ return QRectF(xp + xp1, yp + yp1, w + xp2 - xp1, h + yp2 - yp1); }
inline void QRectF::setWidth(qreal aw)
@@ -773,19 +753,19 @@ inline QRectF QRectF::united(const QRectF &r) const
return *this | r;
}
-inline bool operator==(const QRectF &r1, const QRectF &r2)
+Q_DECL_CONSTEXPR inline bool operator==(const QRectF &r1, const QRectF &r2)
{
return qFuzzyCompare(r1.xp, r2.xp) && qFuzzyCompare(r1.yp, r2.yp)
&& qFuzzyCompare(r1.w, r2.w) && qFuzzyCompare(r1.h, r2.h);
}
-inline bool operator!=(const QRectF &r1, const QRectF &r2)
+Q_DECL_CONSTEXPR inline bool operator!=(const QRectF &r1, const QRectF &r2)
{
return !qFuzzyCompare(r1.xp, r2.xp) || !qFuzzyCompare(r1.yp, r2.yp)
|| !qFuzzyCompare(r1.w, r2.w) || !qFuzzyCompare(r1.h, r2.h);
}
-inline QRect QRectF::toRect() const
+Q_DECL_CONSTEXPR inline QRect QRectF::toRect() const
{
return QRect(qRound(xp), qRound(yp), qRound(w), qRound(h));
}
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index e8c0d4eccc..d7bcd0edbc 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -3934,6 +3934,7 @@ static void invalidateEngine(QRegExpPrivate *priv)
QRegExp::QRegExp()
{
priv = new QRegExpPrivate;
+ prepareEngine(priv);
}
/*!
@@ -3949,6 +3950,7 @@ QRegExp::QRegExp()
QRegExp::QRegExp(const QString &pattern, Qt::CaseSensitivity cs, PatternSyntax syntax)
{
priv = new QRegExpPrivate(QRegExpEngineKey(pattern, syntax, cs));
+ prepareEngine(priv);
}
/*!
diff --git a/src/corelib/tools/qsize.h b/src/corelib/tools/qsize.h
index fece0ac943..88af9e876b 100644
--- a/src/corelib/tools/qsize.h
+++ b/src/corelib/tools/qsize.h
@@ -52,27 +52,27 @@ QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QSize
{
public:
- QSize();
- QSize(int w, int h);
+ Q_DECL_CONSTEXPR QSize();
+ Q_DECL_CONSTEXPR QSize(int w, int h);
- bool isNull() const;
- bool isEmpty() const;
- bool isValid() const;
+ Q_DECL_CONSTEXPR bool isNull() const;
+ Q_DECL_CONSTEXPR bool isEmpty() const;
+ Q_DECL_CONSTEXPR bool isValid() const;
- int width() const;
- int height() const;
+ Q_DECL_CONSTEXPR int width() const;
+ Q_DECL_CONSTEXPR int height() const;
void setWidth(int w);
void setHeight(int h);
void transpose();
- QSize transposed() const;
+ Q_DECL_CONSTEXPR QSize transposed() const;
void scale(int w, int h, Qt::AspectRatioMode mode);
void scale(const QSize &s, Qt::AspectRatioMode mode);
QSize scaled(int w, int h, Qt::AspectRatioMode mode) const;
QSize scaled(const QSize &s, Qt::AspectRatioMode mode) const;
- QSize expandedTo(const QSize &) const;
- QSize boundedTo(const QSize &) const;
+ Q_DECL_CONSTEXPR QSize expandedTo(const QSize &) const;
+ Q_DECL_CONSTEXPR QSize boundedTo(const QSize &) const;
int &rwidth();
int &rheight();
@@ -82,12 +82,12 @@ public:
QSize &operator*=(qreal c);
QSize &operator/=(qreal c);
- friend inline bool operator==(const QSize &, const QSize &);
- friend inline bool operator!=(const QSize &, const QSize &);
- friend inline const QSize operator+(const QSize &, const QSize &);
- friend inline const QSize operator-(const QSize &, const QSize &);
- friend inline const QSize operator*(const QSize &, qreal);
- friend inline const QSize operator*(qreal, const QSize &);
+ friend inline Q_DECL_CONSTEXPR bool operator==(const QSize &, const QSize &);
+ friend inline Q_DECL_CONSTEXPR bool operator!=(const QSize &, const QSize &);
+ friend inline Q_DECL_CONSTEXPR const QSize operator+(const QSize &, const QSize &);
+ friend inline Q_DECL_CONSTEXPR const QSize operator-(const QSize &, const QSize &);
+ friend inline Q_DECL_CONSTEXPR const QSize operator*(const QSize &, qreal);
+ friend inline Q_DECL_CONSTEXPR const QSize operator*(qreal, const QSize &);
friend inline const QSize operator/(const QSize &, qreal);
private:
@@ -110,25 +110,23 @@ Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QSize &);
QSize inline functions
*****************************************************************************/
-inline QSize::QSize()
-{ wd = ht = -1; }
+Q_DECL_CONSTEXPR inline QSize::QSize() : wd(-1), ht(-1) {}
-inline QSize::QSize(int w, int h)
-{ wd = w; ht = h; }
+Q_DECL_CONSTEXPR inline QSize::QSize(int w, int h) : wd(w), ht(h) {}
-inline bool QSize::isNull() const
+Q_DECL_CONSTEXPR inline bool QSize::isNull() const
{ return wd==0 && ht==0; }
-inline bool QSize::isEmpty() const
+Q_DECL_CONSTEXPR inline bool QSize::isEmpty() const
{ return wd<1 || ht<1; }
-inline bool QSize::isValid() const
+Q_DECL_CONSTEXPR inline bool QSize::isValid() const
{ return wd>=0 && ht>=0; }
-inline int QSize::width() const
+Q_DECL_CONSTEXPR inline int QSize::width() const
{ return wd; }
-inline int QSize::height() const
+Q_DECL_CONSTEXPR inline int QSize::height() const
{ return ht; }
inline void QSize::setWidth(int w)
@@ -137,7 +135,7 @@ inline void QSize::setWidth(int w)
inline void QSize::setHeight(int h)
{ ht = h; }
-inline QSize QSize::transposed() const
+Q_DECL_CONSTEXPR inline QSize QSize::transposed() const
{ return QSize(ht, wd); }
inline void QSize::scale(int w, int h, Qt::AspectRatioMode mode)
@@ -164,22 +162,22 @@ inline QSize &QSize::operator-=(const QSize &s)
inline QSize &QSize::operator*=(qreal c)
{ wd = qRound(wd*c); ht = qRound(ht*c); return *this; }
-inline bool operator==(const QSize &s1, const QSize &s2)
+Q_DECL_CONSTEXPR inline bool operator==(const QSize &s1, const QSize &s2)
{ return s1.wd == s2.wd && s1.ht == s2.ht; }
-inline bool operator!=(const QSize &s1, const QSize &s2)
+Q_DECL_CONSTEXPR inline bool operator!=(const QSize &s1, const QSize &s2)
{ return s1.wd != s2.wd || s1.ht != s2.ht; }
-inline const QSize operator+(const QSize & s1, const QSize & s2)
+Q_DECL_CONSTEXPR inline const QSize operator+(const QSize & s1, const QSize & s2)
{ return QSize(s1.wd+s2.wd, s1.ht+s2.ht); }
-inline const QSize operator-(const QSize &s1, const QSize &s2)
+Q_DECL_CONSTEXPR inline const QSize operator-(const QSize &s1, const QSize &s2)
{ return QSize(s1.wd-s2.wd, s1.ht-s2.ht); }
-inline const QSize operator*(const QSize &s, qreal c)
+Q_DECL_CONSTEXPR inline const QSize operator*(const QSize &s, qreal c)
{ return QSize(qRound(s.wd*c), qRound(s.ht*c)); }
-inline const QSize operator*(qreal c, const QSize &s)
+Q_DECL_CONSTEXPR inline const QSize operator*(qreal c, const QSize &s)
{ return QSize(qRound(s.wd*c), qRound(s.ht*c)); }
inline QSize &QSize::operator/=(qreal c)
@@ -195,12 +193,12 @@ inline const QSize operator/(const QSize &s, qreal c)
return QSize(qRound(s.wd/c), qRound(s.ht/c));
}
-inline QSize QSize::expandedTo(const QSize & otherSize) const
+Q_DECL_CONSTEXPR inline QSize QSize::expandedTo(const QSize & otherSize) const
{
return QSize(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht));
}
-inline QSize QSize::boundedTo(const QSize & otherSize) const
+Q_DECL_CONSTEXPR inline QSize QSize::boundedTo(const QSize & otherSize) const
{
return QSize(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht));
}
@@ -213,28 +211,28 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, const QSize &);
class Q_CORE_EXPORT QSizeF
{
public:
- QSizeF();
- QSizeF(const QSize &sz);
- QSizeF(qreal w, qreal h);
+ Q_DECL_CONSTEXPR QSizeF();
+ Q_DECL_CONSTEXPR QSizeF(const QSize &sz);
+ Q_DECL_CONSTEXPR QSizeF(qreal w, qreal h);
bool isNull() const;
- bool isEmpty() const;
- bool isValid() const;
+ Q_DECL_CONSTEXPR bool isEmpty() const;
+ Q_DECL_CONSTEXPR bool isValid() const;
- qreal width() const;
- qreal height() const;
+ Q_DECL_CONSTEXPR qreal width() const;
+ Q_DECL_CONSTEXPR qreal height() const;
void setWidth(qreal w);
void setHeight(qreal h);
void transpose();
- QSizeF transposed() const;
+ Q_DECL_CONSTEXPR QSizeF transposed() const;
void scale(qreal w, qreal h, Qt::AspectRatioMode mode);
void scale(const QSizeF &s, Qt::AspectRatioMode mode);
QSizeF scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const;
QSizeF scaled(const QSizeF &s, Qt::AspectRatioMode mode) const;
- QSizeF expandedTo(const QSizeF &) const;
- QSizeF boundedTo(const QSizeF &) const;
+ Q_DECL_CONSTEXPR QSizeF expandedTo(const QSizeF &) const;
+ Q_DECL_CONSTEXPR QSizeF boundedTo(const QSizeF &) const;
qreal &rwidth();
qreal &rheight();
@@ -244,15 +242,15 @@ public:
QSizeF &operator*=(qreal c);
QSizeF &operator/=(qreal c);
- friend inline bool operator==(const QSizeF &, const QSizeF &);
- friend inline bool operator!=(const QSizeF &, const QSizeF &);
- friend inline const QSizeF operator+(const QSizeF &, const QSizeF &);
- friend inline const QSizeF operator-(const QSizeF &, const QSizeF &);
- friend inline const QSizeF operator*(const QSizeF &, qreal);
- friend inline const QSizeF operator*(qreal, const QSizeF &);
+ friend Q_DECL_CONSTEXPR inline bool operator==(const QSizeF &, const QSizeF &);
+ friend Q_DECL_CONSTEXPR inline bool operator!=(const QSizeF &, const QSizeF &);
+ friend Q_DECL_CONSTEXPR inline const QSizeF operator+(const QSizeF &, const QSizeF &);
+ friend Q_DECL_CONSTEXPR inline const QSizeF operator-(const QSizeF &, const QSizeF &);
+ friend Q_DECL_CONSTEXPR inline const QSizeF operator*(const QSizeF &, qreal);
+ friend Q_DECL_CONSTEXPR inline const QSizeF operator*(qreal, const QSizeF &);
friend inline const QSizeF operator/(const QSizeF &, qreal);
- inline QSize toSize() const;
+ Q_DECL_CONSTEXPR inline QSize toSize() const;
private:
qreal wd;
@@ -275,30 +273,25 @@ Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QSizeF &);
QSizeF inline functions
*****************************************************************************/
-inline QSizeF::QSizeF()
-{ wd = ht = -1.; }
+Q_DECL_CONSTEXPR inline QSizeF::QSizeF() : wd(-1.), ht(-1.) {}
-inline QSizeF::QSizeF(const QSize &sz)
- : wd(sz.width()), ht(sz.height())
-{
-}
+Q_DECL_CONSTEXPR inline QSizeF::QSizeF(const QSize &sz) : wd(sz.width()), ht(sz.height()) {}
-inline QSizeF::QSizeF(qreal w, qreal h)
-{ wd = w; ht = h; }
+Q_DECL_CONSTEXPR inline QSizeF::QSizeF(qreal w, qreal h) : wd(w), ht(h) {}
inline bool QSizeF::isNull() const
{ return qIsNull(wd) && qIsNull(ht); }
-inline bool QSizeF::isEmpty() const
+Q_DECL_CONSTEXPR inline bool QSizeF::isEmpty() const
{ return wd <= 0. || ht <= 0.; }
-inline bool QSizeF::isValid() const
+Q_DECL_CONSTEXPR inline bool QSizeF::isValid() const
{ return wd >= 0. && ht >= 0.; }
-inline qreal QSizeF::width() const
+Q_DECL_CONSTEXPR inline qreal QSizeF::width() const
{ return wd; }
-inline qreal QSizeF::height() const
+Q_DECL_CONSTEXPR inline qreal QSizeF::height() const
{ return ht; }
inline void QSizeF::setWidth(qreal w)
@@ -307,7 +300,7 @@ inline void QSizeF::setWidth(qreal w)
inline void QSizeF::setHeight(qreal h)
{ ht = h; }
-inline QSizeF QSizeF::transposed() const
+Q_DECL_CONSTEXPR inline QSizeF QSizeF::transposed() const
{ return QSizeF(ht, wd); }
inline void QSizeF::scale(qreal w, qreal h, Qt::AspectRatioMode mode)
@@ -334,22 +327,22 @@ inline QSizeF &QSizeF::operator-=(const QSizeF &s)
inline QSizeF &QSizeF::operator*=(qreal c)
{ wd *= c; ht *= c; return *this; }
-inline bool operator==(const QSizeF &s1, const QSizeF &s2)
+Q_DECL_CONSTEXPR inline bool operator==(const QSizeF &s1, const QSizeF &s2)
{ return qFuzzyCompare(s1.wd, s2.wd) && qFuzzyCompare(s1.ht, s2.ht); }
-inline bool operator!=(const QSizeF &s1, const QSizeF &s2)
+Q_DECL_CONSTEXPR inline bool operator!=(const QSizeF &s1, const QSizeF &s2)
{ return !qFuzzyCompare(s1.wd, s2.wd) || !qFuzzyCompare(s1.ht, s2.ht); }
-inline const QSizeF operator+(const QSizeF & s1, const QSizeF & s2)
+Q_DECL_CONSTEXPR inline const QSizeF operator+(const QSizeF & s1, const QSizeF & s2)
{ return QSizeF(s1.wd+s2.wd, s1.ht+s2.ht); }
-inline const QSizeF operator-(const QSizeF &s1, const QSizeF &s2)
+Q_DECL_CONSTEXPR inline const QSizeF operator-(const QSizeF &s1, const QSizeF &s2)
{ return QSizeF(s1.wd-s2.wd, s1.ht-s2.ht); }
-inline const QSizeF operator*(const QSizeF &s, qreal c)
+Q_DECL_CONSTEXPR inline const QSizeF operator*(const QSizeF &s, qreal c)
{ return QSizeF(s.wd*c, s.ht*c); }
-inline const QSizeF operator*(qreal c, const QSizeF &s)
+Q_DECL_CONSTEXPR inline const QSizeF operator*(qreal c, const QSizeF &s)
{ return QSizeF(s.wd*c, s.ht*c); }
inline QSizeF &QSizeF::operator/=(qreal c)
@@ -365,17 +358,17 @@ inline const QSizeF operator/(const QSizeF &s, qreal c)
return QSizeF(s.wd/c, s.ht/c);
}
-inline QSizeF QSizeF::expandedTo(const QSizeF & otherSize) const
+Q_DECL_CONSTEXPR inline QSizeF QSizeF::expandedTo(const QSizeF & otherSize) const
{
return QSizeF(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht));
}
-inline QSizeF QSizeF::boundedTo(const QSizeF & otherSize) const
+Q_DECL_CONSTEXPR inline QSizeF QSizeF::boundedTo(const QSizeF & otherSize) const
{
return QSizeF(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht));
}
-inline QSize QSizeF::toSize() const
+Q_DECL_CONSTEXPR inline QSize QSizeF::toSize() const
{
return QSize(qRound(wd), qRound(ht));
}
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index be6f48808c..d0c2dd7148 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -98,10 +98,6 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_TEXTCODEC
-QTextCodec *QString::codecForCStrings;
-#endif
-
#ifdef QT_USE_ICU
// qlocale_icu.cpp
extern bool qt_ucol_strcoll(const QChar *source, int sourceLength, const QChar *target, int targetLength, int *result);
@@ -473,9 +469,8 @@ const QString::Null QString::null = { };
\snippet doc/src/snippets/qstring/main.cpp 0
QString converts the \c{const char *} data into Unicode using the
- fromAscii() function. By default, fromAscii() treats character
- above 128 as Latin-1 characters, but this can be changed by
- calling QTextCodec::setCodecForCStrings().
+ fromAscii() function. fromAscii() treats ordinals above 128 as Latin-1
+ characters.
In all of the QString functions that take \c{const char *}
parameters, the \c{const char *} is interpreted as a classic
@@ -613,9 +608,7 @@ const QString::Null QString::null = { };
toLatin1(), toUtf8(), and toLocal8Bit().
\list
- \o toAscii() returns an 8-bit string encoded using the codec
- specified by QTextCodec::codecForCStrings (by default, that is
- Latin 1).
+ \o toAscii() returns a Latin-1 (ISO 8859-1) encoded 8-bit string.
\o toLatin1() returns a Latin-1 (ISO 8859-1) encoded 8-bit string.
\o toUtf8() returns a UTF-8 encoded 8-bit string. UTF-8 is a
superset of US-ASCII (ANSI X3.4-1986) that supports the entire
@@ -723,11 +716,11 @@ const QString::Null QString::null = { };
\section1 More Efficient String Construction
Many strings are known at compile time. But the trivial
- constructor QString("Hello"), will convert the string literal
- to a QString using the codecForCStrings(). To avoid this one
- can use the QStringLiteral macro to directly create the required
- data at compile time. Constructing a QString out of the literal
- does then not cause any overhead at runtime.
+ constructor QString("Hello"), will copy the contents of the string,
+ treating the contents as Latin-1. To avoid this one can use the
+ QStringLiteral macro to directly create the required data at compile
+ time. Constructing a QString out of the literal does then not cause
+ any overhead at runtime.
A slightly less efficient way is to use QLatin1String. This class wraps
a C string literal, precalculates it length at compile time and can
@@ -3631,9 +3624,7 @@ QByteArray QString::toLatin1() const
/*!
Returns an 8-bit representation of the string as a QByteArray.
- If a codec has been set using QTextCodec::setCodecForCStrings(),
- it is used to convert Unicode to 8-bit char; otherwise this
- function does the same as toLatin1().
+ This function does the same as toLatin1().
Note that, despite the name, this function does not necessarily return an US-ASCII
(ANSI X3.4-1986) string and its result may not be US-ASCII compatible.
@@ -3642,10 +3633,6 @@ QByteArray QString::toLatin1() const
*/
QByteArray QString::toAscii() const
{
-#ifndef QT_NO_TEXTCODEC
- if (codecForCStrings)
- return codecForCStrings->fromUnicode(*this);
-#endif // QT_NO_TEXTCODEC
return toLatin1();
}
@@ -3779,23 +3766,6 @@ QString::Data *QString::fromLatin1_helper(const char *str, int size)
QString::Data *QString::fromAscii_helper(const char *str, int size)
{
-#ifndef QT_NO_TEXTCODEC
- if (codecForCStrings) {
- Data *d;
- if (!str) {
- d = const_cast<Data *>(&shared_null.str);
- } else if (size == 0 || (!*str && size < 0)) {
- d = const_cast<Data *>(&shared_empty.str);
- } else {
- if (size < 0)
- size = qstrlen(str);
- QString s = codecForCStrings->toUnicode(str, size);
- d = s.d;
- d->ref.ref();
- }
- return d;
- }
-#endif
return fromLatin1_helper(str, size);
}
@@ -3844,11 +3814,7 @@ QString QString::fromLocal8Bit_helper(const char *str, int size)
If \a size is -1 (default), it is taken to be strlen(\a
str).
- Note that, despite the name, this function actually uses the codec
- defined by QTextCodec::setCodecForCStrings() to convert \a str to
- Unicode. Depending on the codec, it may not accept valid US-ASCII (ANSI
- X3.4-1986) input. If no codec has been set, this function does the same
- as fromLatin1().
+ This function does the same as fromLatin1().
\sa toAscii(), fromLatin1(), fromUtf8(), fromLocal8Bit()
*/
@@ -4050,6 +4016,7 @@ QString QString::simplified() const
if (from == fromEnd)
goto done;
} while (!ch.isSpace());
+
}
done:
*to++ = ch;
@@ -4870,42 +4837,51 @@ QString QString::toLower() const
const ushort *p = d->data();
if (!p)
return *this;
- if (!d->size)
- return *this;
-
- const ushort *e = d->data() + d->size;
- // this avoids one out of bounds check in the loop
- if (QChar(*p).isLowSurrogate())
- ++p;
+ const ushort *e = p + d->size;
+ // this avoids out of bounds check in the loop
+ while (e != p && QChar::isHighSurrogate(*(e - 1)))
+ --e;
+ const QUnicodeTables::Properties *prop;
while (p != e) {
- uint c = *p;
- if (QChar(c).isLowSurrogate() && QChar(*(p - 1)).isHighSurrogate())
- c = QChar::surrogateToUcs4(*(p - 1), c);
- const QUnicodeTables::Properties *prop = qGetProp(c);
- if (prop->lowerCaseDiff || prop->lowerCaseSpecial) {
+ if (QChar::isHighSurrogate(*p) && QChar::isLowSurrogate(p[1])) {
+ ushort high = *p++;
+ prop = qGetProp(QChar::surrogateToUcs4(high, *p));
+ } else {
+ prop = qGetProp(*p);
+ }
+ if (prop->lowerCaseDiff) {
+ if (QChar::isLowSurrogate(*p))
+ --p; // safe; diff is 0 for surrogates
QString s(d->size, Qt::Uninitialized);
memcpy(s.d->data(), d->data(), (p - d->data())*sizeof(ushort));
ushort *pp = s.d->data() + (p - d->data());
- while (p < e) {
- uint c = *p;
- if (QChar(c).isLowSurrogate() && QChar(*(p - 1)).isHighSurrogate())
- c = QChar::surrogateToUcs4(*(p - 1), c);
- prop = qGetProp(c);
+ while (p != e) {
+ if (QChar::isHighSurrogate(*p) && QChar::isLowSurrogate(p[1])) {
+ *pp = *p++;
+ prop = qGetProp(QChar::surrogateToUcs4(*pp++, *p));
+ } else {
+ prop = qGetProp(*p);
+ }
if (prop->lowerCaseSpecial) {
+ const ushort *specialCase = specialCaseMap + prop->lowerCaseDiff;
+ ushort length = *specialCase++;
int pos = pp - s.d->data();
- s.resize(s.d->size + SPECIAL_CASE_MAX_LEN);
+ s.resize(s.d->size + length - 1);
pp = s.d->data() + pos;
- const ushort *specialCase = specialCaseMap + prop->lowerCaseDiff;
- while (*specialCase)
+ while (length--)
*pp++ = *specialCase++;
} else {
*pp++ = *p + prop->lowerCaseDiff;
}
++p;
}
- s.truncate(pp - s.d->data());
+
+ // this restores high surrogate parts eaten above, if any
+ while (e != d->data() + d->size)
+ *pp++ = *e++;
+
return s;
}
++p;
@@ -4919,31 +4895,51 @@ QString QString::toLower() const
*/
QString QString::toCaseFolded() const
{
- if (!d->size)
- return *this;
-
const ushort *p = d->data();
if (!p)
return *this;
- const ushort *e = d->data() + d->size;
+ const ushort *e = p + d->size;
+ // this avoids out of bounds check in the loop
+ while (e != p && QChar::isHighSurrogate(*(e - 1)))
+ --e;
- uint last = 0;
- while (p < e) {
- ushort folded = foldCase(*p, last);
- if (folded != *p) {
- QString s(*this);
- s.detach();
+ const QUnicodeTables::Properties *prop;
+ while (p != e) {
+ if (QChar::isHighSurrogate(*p) && QChar::isLowSurrogate(p[1])) {
+ ushort high = *p++;
+ prop = qGetProp(QChar::surrogateToUcs4(high, *p));
+ } else {
+ prop = qGetProp(*p);
+ }
+ if (prop->caseFoldDiff) {
+ if (QChar::isLowSurrogate(*p))
+ --p; // safe; diff is 0 for surrogates
+ QString s(d->size, Qt::Uninitialized);
+ memcpy(s.d->data(), d->data(), (p - d->data())*sizeof(ushort));
ushort *pp = s.d->data() + (p - d->data());
- const ushort *ppe = s.d->data() + s.d->size;
- last = pp > s.d->data() ? *(pp - 1) : 0;
- while (pp < ppe) {
- *pp = foldCase(*pp, last);
- ++pp;
+ while (p != e) {
+ if (QChar::isHighSurrogate(*p) && QChar::isLowSurrogate(p[1])) {
+ *pp = *p++;
+ prop = qGetProp(QChar::surrogateToUcs4(*pp++, *p));
+ } else {
+ prop = qGetProp(*p);
+ }
+ if (prop->caseFoldSpecial) {
+ //### we currently don't support full case foldings
+ } else {
+ *pp++ = *p + prop->caseFoldDiff;
+ }
+ ++p;
}
+
+ // this restores high surrogate parts eaten above, if any
+ while (e != d->data() + d->size)
+ *pp++ = *e++;
+
return s;
}
- p++;
+ ++p;
}
return *this;
}
@@ -4958,48 +4954,56 @@ QString QString::toCaseFolded() const
\sa toLower(), QLocale::toLower()
*/
-
QString QString::toUpper() const
{
const ushort *p = d->data();
if (!p)
return *this;
- if (!d->size)
- return *this;
- const ushort *e = d->data() + d->size;
-
- // this avoids one out of bounds check in the loop
- if (QChar(*p).isLowSurrogate())
- ++p;
+ const ushort *e = p + d->size;
+ // this avoids out of bounds check in the loop
+ while (e != p && QChar::isHighSurrogate(*(e - 1)))
+ --e;
+ const QUnicodeTables::Properties *prop;
while (p != e) {
- uint c = *p;
- if (QChar(c).isLowSurrogate() && QChar(*(p - 1)).isHighSurrogate())
- c = QChar::surrogateToUcs4(*(p - 1), c);
- const QUnicodeTables::Properties *prop = qGetProp(c);
- if (prop->upperCaseDiff || prop->upperCaseSpecial) {
+ if (QChar::isHighSurrogate(*p) && QChar::isLowSurrogate(p[1])) {
+ ushort high = *p++;
+ prop = qGetProp(QChar::surrogateToUcs4(high, *p));
+ } else {
+ prop = qGetProp(*p);
+ }
+ if (prop->upperCaseDiff) {
+ if (QChar::isLowSurrogate(*p))
+ --p; // safe; diff is 0 for surrogates
QString s(d->size, Qt::Uninitialized);
memcpy(s.d->data(), d->data(), (p - d->data())*sizeof(ushort));
ushort *pp = s.d->data() + (p - d->data());
- while (p < e) {
- uint c = *p;
- if (QChar(c).isLowSurrogate() && QChar(*(p - 1)).isHighSurrogate())
- c = QChar::surrogateToUcs4(*(p - 1), c);
- prop = qGetProp(c);
+ while (p != e) {
+ if (QChar::isHighSurrogate(*p) && QChar::isLowSurrogate(p[1])) {
+ *pp = *p++;
+ prop = qGetProp(QChar::surrogateToUcs4(*pp++, *p));
+ } else {
+ prop = qGetProp(*p);
+ }
if (prop->upperCaseSpecial) {
+ const ushort *specialCase = specialCaseMap + prop->upperCaseDiff;
+ ushort length = *specialCase++;
int pos = pp - s.d->data();
- s.resize(s.d->size + SPECIAL_CASE_MAX_LEN);
+ s.resize(s.d->size + length - 1);
pp = s.d->data() + pos;
- const ushort *specialCase = specialCaseMap + prop->upperCaseDiff;
- while (*specialCase)
+ while (length--)
*pp++ = *specialCase++;
} else {
*pp++ = *p + prop->upperCaseDiff;
}
++p;
}
- s.truncate(pp - s.d->data());
+
+ // this restores high surrogate parts eaten above, if any
+ while (e != d->data() + d->size)
+ *pp++ = *e++;
+
return s;
}
++p;
@@ -5079,19 +5083,8 @@ QString &QString::vsprintf(const char* cformat, va_list ap)
const char *c = cformat;
for (;;) {
// Copy non-escape chars to result
-#ifndef QT_NO_TEXTCODEC
- int i = 0;
- while (*(c + i) != '\0' && *(c + i) != '%')
- ++i;
- if (codecForCStrings)
- result.append(codecForCStrings->toUnicode(c, i));
- else
- result.append(fromLatin1(c, i));
- c += i;
-#else
while (*c != '\0' && *c != '%')
result.append(QLatin1Char(*c++));
-#endif
if (*c == '\0')
break;
@@ -7003,8 +6996,7 @@ bool QString::isRightToLeft() const
This operator is mostly useful to pass a QString to a function
that accepts a std::string object.
- If the QString contains Unicode characters that the
- QTextCodec::codecForCStrings() codec cannot handle, using this operator
+ If the QString contains non-Latin1 Unicode characters, using this
can lead to loss of information.
This operator is only available if Qt is configured with STL
@@ -8673,9 +8665,7 @@ QByteArray QStringRef::toLatin1() const
Returns an 8-bit representation of the string as a QByteArray.
- If a codec has been set using QTextCodec::setCodecForCStrings(),
- it is used to convert Unicode to 8-bit char; otherwise this
- function does the same as toLatin1().
+ This function does the same as toLatin1().
Note that, despite the name, this function does not necessarily return an US-ASCII
(ANSI X3.4-1986) string and its result may not be US-ASCII compatible.
@@ -8684,10 +8674,6 @@ QByteArray QStringRef::toLatin1() const
*/
QByteArray QStringRef::toAscii() const
{
-#ifndef QT_NO_TEXTCODEC
- if (QString::codecForCStrings)
- return QString::codecForCStrings->fromUnicode(unicode(), length());
-#endif // QT_NO_TEXTCODEC
return toLatin1();
}
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 90fed78a15..ba68ab022b 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -496,10 +496,10 @@ public:
// ASCII compatibility
#ifndef QT_NO_CAST_FROM_ASCII
- inline QT_ASCII_CAST_WARN_CONSTRUCTOR QString(const char *ch)
+ inline QT_ASCII_CAST_WARN QString(const char *ch)
: d(fromAscii_helper(ch, ch ? int(strlen(ch)) : -1))
{}
- inline QT_ASCII_CAST_WARN_CONSTRUCTOR QString(const QByteArray &a)
+ inline QT_ASCII_CAST_WARN QString(const QByteArray &a)
: d(fromAscii_helper(a.constData(), qstrnlen(a.constData(), a.size())))
{}
inline QT_ASCII_CAST_WARN QString &operator=(const char *ch)
@@ -603,9 +603,6 @@ private:
Data *d;
inline QString(Data *dd, int /*dummy*/) : d(dd) {}
-#ifndef QT_NO_TEXTCODEC
- static QTextCodec *codecForCStrings;
-#endif
static int grow(int);
static void free(Data *);
void realloc();
@@ -926,9 +923,6 @@ inline bool operator!=(const QString &s, QString::Null) { return !s.isNull(); }
#ifndef QT_NO_CAST_FROM_ASCII
inline bool qStringComparisonHelper(const QString &s1, const char *s2)
{
-# ifndef QT_NO_TEXTCODEC
- if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2, s2 ? int(strlen(s2)) : -1));
-# endif
return (s1 == QLatin1String(s2));
}
inline bool QString::operator==(const char *s) const
@@ -1215,9 +1209,6 @@ inline bool operator>=(const QStringRef &s1, const QStringRef &s2)
inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2)
{
-# ifndef QT_NO_TEXTCODEC
- if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2, s2 ? int(strlen(s2)) : -1));
-# endif
return (s1 == QLatin1String(s2));
}
diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp
index 3d6b0eb709..6999972172 100644
--- a/src/corelib/tools/qstringbuilder.cpp
+++ b/src/corelib/tools/qstringbuilder.cpp
@@ -105,14 +105,6 @@ QT_BEGIN_NAMESPACE
*/
void QAbstractConcatenable::convertFromAscii(const char *a, int len, QChar *&out)
{
-#ifndef QT_NO_TEXTCODEC
- if (QString::codecForCStrings && len) {
- QString tmp = QString::fromAscii(a, len > 0 ? len : -1);
- memcpy(out, reinterpret_cast<const char *>(tmp.constData()), sizeof(QChar) * tmp.size());
- out += tmp.length();
- return;
- }
-#endif
if (len == -1) {
if (!a)
return;
@@ -124,25 +116,4 @@ void QAbstractConcatenable::convertFromAscii(const char *a, int len, QChar *&out
}
}
-/*! \internal */
-void QAbstractConcatenable::convertToAscii(const QChar* a, int len, char*& out)
-{
-#ifndef QT_NO_TEXTCODEC
- if (QString::codecForCStrings) {
- QByteArray tmp = QString::codecForCStrings->fromUnicode(a, len);
- memcpy(out, tmp.constData(), tmp.size());
- out += tmp.length();
- return;
- }
-#endif
- if (len == -1) {
- while (a->unicode())
- convertToLatin1(*a++, out);
- } else {
- for (int i = 0; i < len; ++i)
- convertToLatin1(a[i], out);
- }
-}
-
-
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h
index e524523c36..c19d733243 100644
--- a/src/corelib/tools/qstringbuilder.h
+++ b/src/corelib/tools/qstringbuilder.h
@@ -62,30 +62,9 @@ struct Q_CORE_EXPORT QAbstractConcatenable
{
protected:
static void convertFromAscii(const char *a, int len, QChar *&out);
- static void convertToAscii(const QChar *a, int len, char *&out);
static inline void convertFromAscii(char a, QChar *&out)
{
-#ifndef QT_NO_TEXTCODEC
- if (QString::codecForCStrings)
- *out++ = QChar::fromAscii(a);
- else
-#endif
- *out++ = QLatin1Char(a);
- }
-
- static inline void convertToAscii(QChar a, char *&out)
- {
-#ifndef QT_NO_TEXTCODEC
- if (QString::codecForCStrings)
- *out++ = a.toAscii(); //###
- else
-#endif
- convertToLatin1(a, out);
- }
-
- static inline void convertToLatin1(QChar a, char *&out)
- {
- *out++ = a.unicode() > 0xff ? '?' : char(a.unicode());
+ *out++ = QLatin1Char(a);
}
};
@@ -192,10 +171,6 @@ template <> struct QConcatenable<QChar> : private QAbstractConcatenable
static int size(const QChar) { return 1; }
static inline void appendTo(const QChar c, QChar *&out)
{ *out++ = c; }
-#ifndef QT_NO_CAST_TO_ASCII
- static inline QT_ASCII_CAST_WARN void appendTo(const QChar c, char *&out)
- { convertToAscii(c, out); }
-#endif
};
template <> struct QConcatenable<QCharRef> : private QAbstractConcatenable
@@ -206,10 +181,6 @@ template <> struct QConcatenable<QCharRef> : private QAbstractConcatenable
static int size(const QCharRef &) { return 1; }
static inline void appendTo(const QCharRef &c, QChar *&out)
{ *out++ = QChar(c); }
-#ifndef QT_NO_CAST_TO_ASCII
- static inline QT_ASCII_CAST_WARN void appendTo(const QCharRef &c, char *&out)
- { convertToAscii(c, out); }
-#endif
};
template <> struct QConcatenable<QLatin1String>
@@ -242,10 +213,6 @@ template <> struct QConcatenable<QString> : private QAbstractConcatenable
memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n);
out += n;
}
-#ifndef QT_NO_CAST_TO_ASCII
- static inline QT_ASCII_CAST_WARN void appendTo(const QString &a, char *&out)
- { convertToAscii(a.constData(), a.length(), out); }
-#endif
};
template <int N> struct QConcatenable<QStaticStringDataPtr<N> > : private QAbstractConcatenable
@@ -259,10 +226,6 @@ template <int N> struct QConcatenable<QStaticStringDataPtr<N> > : private QAbstr
memcpy(out, reinterpret_cast<const char*>(a.ptr->data), sizeof(QChar) * N);
out += N;
}
-#ifndef QT_NO_CAST_TO_ASCII
- static inline QT_ASCII_CAST_WARN void appendTo(const type &a, char *&out)
- { convertToAscii(a.ptr->data, N, out); }
-#endif
};
template <> struct QConcatenable<QStringRef> : private QAbstractConcatenable
@@ -277,11 +240,6 @@ template <> struct QConcatenable<QStringRef> : private QAbstractConcatenable
memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n);
out += n;
}
-#ifndef QT_NO_CAST_TO_ASCII
- static inline QT_ASCII_CAST_WARN void appendTo(const QStringRef &a, char *&out)
- { convertToAscii(a.constData(), a.length(), out); }
-#endif
-
};
template <int N> struct QConcatenable<char[N]> : private QAbstractConcatenable
diff --git a/src/corelib/tools/qunicodetables.cpp b/src/corelib/tools/qunicodetables.cpp
index 7f823d4380..91d260b724 100644
--- a/src/corelib/tools/qunicodetables.cpp
+++ b/src/corelib/tools/qunicodetables.cpp
@@ -3488,13 +3488,13 @@ static const QUnicodeTables::Properties uc_properties[] = {
{ 5, 11, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 24, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, 10 },
{ 5, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 3, 0, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 4, 1, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 121, 121, 0, 0, 3, 4 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4 },
- { 14, 11, 0, 0, 0, -1, 1, 1, 0, 0, 0, 0, 6, 0, 0, 0, 0, 3, 5 },
+ { 14, 11, 0, 0, 0, -1, 1, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 3, 5 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -232, -232, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 85, 85, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 86, 86, 0, 0, 3, 4 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -121, 0, 0, -121, 0, 3, 5 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -300, -300, -268, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 195, 195, 0, 0, 3, 4 },
@@ -3521,7 +3521,7 @@ static const QUnicodeTables::Properties uc_properties[] = {
{ 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 1, -1, 0, 1, 0, 3, 5 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -2, -1, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -79, -79, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 96, 96, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 97, 97, 0, 0, 3, 4 },
{ 14, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, -97, 0, 0, -97, 0, 3, 5 },
{ 14, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, -56, 0, 0, -56, 0, 3, 5 },
{ 14, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5 },
@@ -3591,10 +3591,10 @@ static const QUnicodeTables::Properties uc_properties[] = {
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 37, 0, 0, 37, 0, 3, 5 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 64, 0, 0, 64, 0, 3, 5 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 63, 0, 0, 63, 0, 3, 5 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 88, 88, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 89, 89, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -38, -38, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -37, -37, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 92, 92, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 93, 93, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -31, -31, 1, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -64, -64, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -63, -63, 0, 0, 3, 4 },
@@ -3627,7 +3627,7 @@ static const QUnicodeTables::Properties uc_properties[] = {
{ 25, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 25, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -48, -48, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 52, 49, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 53, 50, 0, 0, 3, 4 },
{ 25, 7, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 9 },
{ 20, 15, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 13, 11, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
@@ -3911,105 +3911,105 @@ static const QUnicodeTables::Properties uc_properties[] = {
{ 17, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
{ 17, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 3814, 3814, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 99, 99, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 102, 102, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 105, 105, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 108, 108, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 111, 111, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 100, 100, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 103, 103, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 106, 106, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 109, 109, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 112, 112, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, -59, -59, -58, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 3, 4 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -8, 0, 0, -8, 0, 3, 5 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 114, 114, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 117, 117, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 121, 121, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 125, 125, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 115, 115, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 118, 118, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 122, 122, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 126, 126, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 74, 74, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 86, 86, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 100, 100, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 128, 128, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 112, 112, 0, 0, 3, 4 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 126, 126, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 163, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 166, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 169, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 172, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 175, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 178, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 181, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 184, 8, 0, 0, 3, 4 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 163, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 166, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 169, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 172, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 175, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 178, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 181, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 184, 0, -8, 0, 3, 5 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 187, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 190, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 193, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 196, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 199, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 202, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 205, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 208, 8, 0, 0, 3, 4 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 187, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 190, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 193, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 196, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 199, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 202, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 205, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 208, 0, -8, 0, 3, 5 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 211, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 214, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 217, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 220, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 223, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 226, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 229, 8, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 232, 8, 0, 0, 3, 4 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 211, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 214, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 217, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 220, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 223, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 226, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 229, 0, -8, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 232, 0, -8, 0, 3, 5 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 247, 244, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 235, 9, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 253, 250, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 129, 129, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 284, 280, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 164, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 167, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 170, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 173, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 176, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 179, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 182, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 185, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 164, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 167, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 170, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 173, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 176, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 179, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 182, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 185, 0, -8, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 188, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 191, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 194, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 197, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 200, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 203, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 206, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 209, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 188, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 191, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 194, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 197, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 200, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 203, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 206, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 209, 0, -8, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 212, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 215, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 218, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 221, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 224, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 227, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 230, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 233, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 212, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 215, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 218, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 221, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 224, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 227, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 230, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 233, 0, -8, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 248, 245, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 236, 9, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 254, 251, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 130, 130, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 285, 281, 0, 0, 3, 4 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -74, 0, 0, -74, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 235, 0, -9, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 236, 0, -9, 0, 3, 5 },
{ 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -7205, -7205, -7173, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 259, 256, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 238, 9, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 265, 262, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 132, 132, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 292, 288, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 260, 257, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 239, 9, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 266, 263, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 133, 133, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 293, 289, 0, 0, 3, 4 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -86, 0, 0, -86, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 238, 0, -9, 0, 3, 5 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 135, 135, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 139, 139, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 142, 142, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 239, 0, -9, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 136, 136, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 140, 140, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 143, 143, 0, 0, 3, 4 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -100, 0, 0, -100, 0, 3, 5 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 146, 146, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 150, 150, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 153, 153, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 156, 156, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 147, 147, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 151, 151, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 154, 154, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 157, 157, 0, 0, 3, 4 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -112, 0, 0, -112, 0, 3, 5 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -7, 0, 0, -7, 0, 3, 5 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 271, 268, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 241, 9, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 277, 274, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 160, 160, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 300, 296, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 272, 269, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 242, 9, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 278, 275, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 161, 161, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 301, 297, 0, 0, 3, 4 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -128, 0, 0, -128, 0, 3, 5 },
{ 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -126, 0, 0, -126, 0, 3, 5 },
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 241, 0, -9, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 242, 0, -9, 0, 3, 5 },
{ 6, 15, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 },
{ 6, 3, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 },
{ 10, 18, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
@@ -4212,17 +4212,17 @@ static const QUnicodeTables::Properties uc_properties[] = {
{ 11, 27, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 12, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 18, 12, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 12, 9, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 18, 15, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 24, 21, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 31, 27, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 39, 35, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 46, 43, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 58, 55, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 64, 61, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 70, 67, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 76, 73, 0, 0, 3, 4 },
- { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 82, 79, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 13, 10, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 19, 16, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 25, 22, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 32, 28, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 40, 36, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 47, 44, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 59, 56, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 65, 62, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 71, 68, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 77, 74, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 83, 80, 0, 0, 3, 4 },
{ 18, 11, 1, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
{ 0, 19, 17, 26, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
{ 13, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
@@ -4351,102 +4351,102 @@ Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL QUnicodeTables::lineBre
}
static const ushort specialCaseMap[] = {
- 0x53, 0x73, 0x0,
- 0x53, 0x53, 0x0,
- 0x69, 0x307, 0x0,
- 0x46, 0x66, 0x0,
- 0x46, 0x46, 0x0,
- 0x46, 0x69, 0x0,
- 0x46, 0x49, 0x0,
- 0x46, 0x6c, 0x0,
- 0x46, 0x4c, 0x0,
- 0x46, 0x66, 0x69, 0x0,
- 0x46, 0x46, 0x49, 0x0,
- 0x46, 0x66, 0x6c, 0x0,
- 0x46, 0x46, 0x4c, 0x0,
- 0x53, 0x74, 0x0,
- 0x53, 0x54, 0x0,
- 0x535, 0x582, 0x0,
- 0x535, 0x552, 0x0,
- 0x544, 0x576, 0x0,
- 0x544, 0x546, 0x0,
- 0x544, 0x565, 0x0,
- 0x544, 0x535, 0x0,
- 0x544, 0x56b, 0x0,
- 0x544, 0x53b, 0x0,
- 0x54e, 0x576, 0x0,
- 0x54e, 0x546, 0x0,
- 0x544, 0x56d, 0x0,
- 0x544, 0x53d, 0x0,
- 0x2bc, 0x4e, 0x0,
- 0x399, 0x308, 0x301, 0x0,
- 0x3a5, 0x308, 0x301, 0x0,
- 0x4a, 0x30c, 0x0,
- 0x48, 0x331, 0x0,
- 0x54, 0x308, 0x0,
- 0x57, 0x30a, 0x0,
- 0x59, 0x30a, 0x0,
- 0x41, 0x2be, 0x0,
- 0x3a5, 0x313, 0x0,
- 0x3a5, 0x313, 0x300, 0x0,
- 0x3a5, 0x313, 0x301, 0x0,
- 0x3a5, 0x313, 0x342, 0x0,
- 0x391, 0x342, 0x0,
- 0x397, 0x342, 0x0,
- 0x399, 0x308, 0x300, 0x0,
- 0x399, 0x342, 0x0,
- 0x399, 0x308, 0x342, 0x0,
- 0x3a5, 0x308, 0x300, 0x0,
- 0x3a1, 0x313, 0x0,
- 0x3a5, 0x342, 0x0,
- 0x3a5, 0x308, 0x342, 0x0,
- 0x3a9, 0x342, 0x0,
- 0x1f08, 0x399, 0x0,
- 0x1f09, 0x399, 0x0,
- 0x1f0a, 0x399, 0x0,
- 0x1f0b, 0x399, 0x0,
- 0x1f0c, 0x399, 0x0,
- 0x1f0d, 0x399, 0x0,
- 0x1f0e, 0x399, 0x0,
- 0x1f0f, 0x399, 0x0,
- 0x1f28, 0x399, 0x0,
- 0x1f29, 0x399, 0x0,
- 0x1f2a, 0x399, 0x0,
- 0x1f2b, 0x399, 0x0,
- 0x1f2c, 0x399, 0x0,
- 0x1f2d, 0x399, 0x0,
- 0x1f2e, 0x399, 0x0,
- 0x1f2f, 0x399, 0x0,
- 0x1f68, 0x399, 0x0,
- 0x1f69, 0x399, 0x0,
- 0x1f6a, 0x399, 0x0,
- 0x1f6b, 0x399, 0x0,
- 0x1f6c, 0x399, 0x0,
- 0x1f6d, 0x399, 0x0,
- 0x1f6e, 0x399, 0x0,
- 0x1f6f, 0x399, 0x0,
- 0x391, 0x399, 0x0,
- 0x397, 0x399, 0x0,
- 0x3a9, 0x399, 0x0,
- 0x1fba, 0x345, 0x0,
- 0x1fba, 0x399, 0x0,
- 0x386, 0x345, 0x0,
- 0x386, 0x399, 0x0,
- 0x1fca, 0x345, 0x0,
- 0x1fca, 0x399, 0x0,
- 0x389, 0x345, 0x0,
- 0x389, 0x399, 0x0,
- 0x1ffa, 0x345, 0x0,
- 0x1ffa, 0x399, 0x0,
- 0x38f, 0x345, 0x0,
- 0x38f, 0x399, 0x0,
- 0x391, 0x342, 0x345, 0x0,
- 0x391, 0x342, 0x399, 0x0,
- 0x397, 0x342, 0x345, 0x0,
- 0x397, 0x342, 0x399, 0x0,
- 0x3a9, 0x342, 0x345, 0x0,
- 0x3a9, 0x342, 0x399, 0x0
-
+ 0x0, // placeholder
+ 0x2, 0x53, 0x73,
+ 0x2, 0x53, 0x53,
+ 0x2, 0x69, 0x307,
+ 0x2, 0x46, 0x66,
+ 0x2, 0x46, 0x46,
+ 0x2, 0x46, 0x69,
+ 0x2, 0x46, 0x49,
+ 0x2, 0x46, 0x6c,
+ 0x2, 0x46, 0x4c,
+ 0x3, 0x46, 0x66, 0x69,
+ 0x3, 0x46, 0x46, 0x49,
+ 0x3, 0x46, 0x66, 0x6c,
+ 0x3, 0x46, 0x46, 0x4c,
+ 0x2, 0x53, 0x74,
+ 0x2, 0x53, 0x54,
+ 0x2, 0x535, 0x582,
+ 0x2, 0x535, 0x552,
+ 0x2, 0x544, 0x576,
+ 0x2, 0x544, 0x546,
+ 0x2, 0x544, 0x565,
+ 0x2, 0x544, 0x535,
+ 0x2, 0x544, 0x56b,
+ 0x2, 0x544, 0x53b,
+ 0x2, 0x54e, 0x576,
+ 0x2, 0x54e, 0x546,
+ 0x2, 0x544, 0x56d,
+ 0x2, 0x544, 0x53d,
+ 0x2, 0x2bc, 0x4e,
+ 0x3, 0x399, 0x308, 0x301,
+ 0x3, 0x3a5, 0x308, 0x301,
+ 0x2, 0x4a, 0x30c,
+ 0x2, 0x48, 0x331,
+ 0x2, 0x54, 0x308,
+ 0x2, 0x57, 0x30a,
+ 0x2, 0x59, 0x30a,
+ 0x2, 0x41, 0x2be,
+ 0x2, 0x3a5, 0x313,
+ 0x3, 0x3a5, 0x313, 0x300,
+ 0x3, 0x3a5, 0x313, 0x301,
+ 0x3, 0x3a5, 0x313, 0x342,
+ 0x2, 0x391, 0x342,
+ 0x2, 0x397, 0x342,
+ 0x3, 0x399, 0x308, 0x300,
+ 0x2, 0x399, 0x342,
+ 0x3, 0x399, 0x308, 0x342,
+ 0x3, 0x3a5, 0x308, 0x300,
+ 0x2, 0x3a1, 0x313,
+ 0x2, 0x3a5, 0x342,
+ 0x3, 0x3a5, 0x308, 0x342,
+ 0x2, 0x3a9, 0x342,
+ 0x2, 0x1f08, 0x399,
+ 0x2, 0x1f09, 0x399,
+ 0x2, 0x1f0a, 0x399,
+ 0x2, 0x1f0b, 0x399,
+ 0x2, 0x1f0c, 0x399,
+ 0x2, 0x1f0d, 0x399,
+ 0x2, 0x1f0e, 0x399,
+ 0x2, 0x1f0f, 0x399,
+ 0x2, 0x1f28, 0x399,
+ 0x2, 0x1f29, 0x399,
+ 0x2, 0x1f2a, 0x399,
+ 0x2, 0x1f2b, 0x399,
+ 0x2, 0x1f2c, 0x399,
+ 0x2, 0x1f2d, 0x399,
+ 0x2, 0x1f2e, 0x399,
+ 0x2, 0x1f2f, 0x399,
+ 0x2, 0x1f68, 0x399,
+ 0x2, 0x1f69, 0x399,
+ 0x2, 0x1f6a, 0x399,
+ 0x2, 0x1f6b, 0x399,
+ 0x2, 0x1f6c, 0x399,
+ 0x2, 0x1f6d, 0x399,
+ 0x2, 0x1f6e, 0x399,
+ 0x2, 0x1f6f, 0x399,
+ 0x2, 0x391, 0x399,
+ 0x2, 0x397, 0x399,
+ 0x2, 0x3a9, 0x399,
+ 0x2, 0x1fba, 0x345,
+ 0x2, 0x1fba, 0x399,
+ 0x2, 0x386, 0x345,
+ 0x2, 0x386, 0x399,
+ 0x2, 0x1fca, 0x345,
+ 0x2, 0x1fca, 0x399,
+ 0x2, 0x389, 0x345,
+ 0x2, 0x389, 0x399,
+ 0x2, 0x1ffa, 0x345,
+ 0x2, 0x1ffa, 0x399,
+ 0x2, 0x38f, 0x345,
+ 0x2, 0x38f, 0x399,
+ 0x3, 0x391, 0x342, 0x345,
+ 0x3, 0x391, 0x342, 0x399,
+ 0x3, 0x397, 0x342, 0x345,
+ 0x3, 0x397, 0x342, 0x399,
+ 0x3, 0x3a9, 0x342, 0x345,
+ 0x3, 0x3a9, 0x342, 0x399
};
#define SPECIAL_CASE_MAX_LEN 3