diff options
author | Iikka Eklund <iikka.eklund@digia.com> | 2014-04-02 07:36:48 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-02 07:36:48 +0200 |
commit | d6f58e5e17d58c640fc7779652008fda0d66f41d (patch) | |
tree | d50d27e260c9eaf4bc2bcb4480b8a069a3aed857 /src/corelib/tools | |
parent | 83de197a57ff6c3e5bbad26bd871981285384fcb (diff) | |
parent | 0ab63b035a649dc1982c867cd37d466d249004b9 (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qmargins.cpp | 20 | ||||
-rw-r--r-- | src/corelib/tools/qpoint.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qrect.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qsimd_p.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 24 | ||||
-rw-r--r-- | src/corelib/tools/qstring.h | 2 |
6 files changed, 45 insertions, 7 deletions
diff --git a/src/corelib/tools/qmargins.cpp b/src/corelib/tools/qmargins.cpp index 03993f05a9..6f2c6c2c7c 100644 --- a/src/corelib/tools/qmargins.cpp +++ b/src/corelib/tools/qmargins.cpp @@ -334,6 +334,26 @@ QT_BEGIN_NAMESPACE */ /*! + \fn QMargins &QMargins::operator+=(int addend) + \overload + + Adds the \a addend to each component of this object + and returns a reference to it. + + \sa operator-=() +*/ + +/*! + \fn QMargins &QMargins::operator-=(int subtrahend) + \overload + + Subtracts the \a subtrahend from each component of this object + and returns a reference to it. + + \sa operator+=() +*/ + +/*! \fn QMargins &QMargins::operator*=(int factor) Multiplies each component of this object by \a factor diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp index f154e4c612..090e8d0ff2 100644 --- a/src/corelib/tools/qpoint.cpp +++ b/src/corelib/tools/qpoint.cpp @@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE \class QPoint \inmodule QtCore \ingroup painting + \reentrant \brief The QPoint class defines a point in the plane using integer precision. @@ -470,6 +471,7 @@ QDebug operator<<(QDebug dbg, const QPointF &p) \class QPointF \inmodule QtCore \ingroup painting + \reentrant \brief The QPointF class defines a point in the plane using floating point precision. diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp index 35c7d1cd3c..04269e485b 100644 --- a/src/corelib/tools/qrect.cpp +++ b/src/corelib/tools/qrect.cpp @@ -52,6 +52,7 @@ QT_BEGIN_NAMESPACE \class QRect \inmodule QtCore \ingroup painting + \reentrant \brief The QRect class defines a rectangle in the plane using integer precision. @@ -1298,6 +1299,7 @@ QDebug operator<<(QDebug dbg, const QRect &r) \class QRectF \inmodule QtCore \ingroup painting + \reentrant \brief The QRectF class defines a rectangle in the plane using floating point precision. diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index d293532f1d..f4ca971567 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -79,7 +79,7 @@ // SSE intrinsics #if defined(__SSE2__) || (defined(QT_COMPILER_SUPPORTS_SSE2) && defined(Q_CC_MSVC)) -#if defined(QT_LINUXBASE) +#if defined(QT_LINUXBASE) || defined(Q_OS_ANDROID_NO_SDK) /// this is an evil hack - the posix_memalign declaration in LSB /// is wrong - see http://bugs.linuxbase.org/show_bug.cgi?id=2431 # define posix_memalign _lsb_hack_posix_memalign diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 7547ba8c19..01faad6f2d 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -78,6 +78,7 @@ #include "qchar.cpp" #include "qstringmatcher.cpp" #include "qstringiterator_p.h" +#include "qthreadstorage.h" #ifdef Q_OS_WIN # include <qt_windows.h> @@ -5319,6 +5320,10 @@ int QString::localeAwareCompare(const QString &other) const return localeAwareCompare_helper(constData(), length(), other.constData(), other.length()); } +#if defined(QT_USE_ICU) +Q_GLOBAL_STATIC(QThreadStorage<QCollator>, defaultCollator) +#endif + /*! \internal \since 4.5 @@ -5362,8 +5367,9 @@ int QString::localeAwareCompare_helper(const QChar *data1, int length1, CFRelease(otherString); return result; #elif defined(QT_USE_ICU) - QCollator collator; - return collator.compare(data1, length1, data2, length2); + if (!defaultCollator()->hasLocalData()) + defaultCollator()->setLocalData(QCollator()); + return defaultCollator()->localData().compare(data1, length1, data2, length2); #elif defined(Q_OS_UNIX) // declared in <string.h> int delta = strcoll(toLocal8Bit_helper(data1, length1).constData(), toLocal8Bit_helper(data2, length2).constData()); @@ -6168,7 +6174,7 @@ qulonglong QString::toIntegral_helper(const QChar *data, uint len, bool *ok, int \snippet qstring/main.cpp 73 - \sa number(), toULong(), toInt(), QLocale::toLong() + \sa number(), toULong(), toInt(), QLocale::toInt() */ long QString::toLong(bool *ok, int base) const @@ -6197,7 +6203,7 @@ long QString::toLong(bool *ok, int base) const \snippet qstring/main.cpp 78 - \sa number(), QLocale::toULong() + \sa number(), QLocale::toUInt() */ ulong QString::toULong(bool *ok, int base) const @@ -7562,6 +7568,8 @@ QString QString::multiArg(int numArgs, const QString **args) const \since 5.2 Constructs a new QString containing a copy of the \a string CFString. + + \note this function is only available on Mac OS X and iOS. */ /*! \fn CFStringRef QString::toCFString() const @@ -7569,18 +7577,24 @@ QString QString::multiArg(int numArgs, const QString **args) const Creates a CFString from a QString. The caller owns the CFString and is responsible for releasing it. + + \note this function is only available on Mac OS X and iOS. */ /*! \fn QString QString::fromNSString(const NSString *string) \since 5.2 Constructs a new QString containing a copy of the \a string NSString. + + \note this function is only available on Mac OS X and iOS. */ /*! \fn NSString QString::toNSString() const \since 5.2 - Creates a NSString from a QString.g. The NSString is autoreleased. + Creates a NSString from a QString. The NSString is autoreleased. + + \note this function is only available on Mac OS X and iOS. */ /*! \fn bool QString::isSimpleText() const diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index cf0726d831..2d9a42957e 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -711,7 +711,7 @@ public: Q_DECL_CONSTEXPR inline QString(QStringDataPtr dd) : d(dd.ptr) {} private: -#if defined(QT_NO_CAST_FROM_ASCII) && !defined(Q_NO_DECLARED_NOT_DEFINED) +#if defined(QT_NO_CAST_FROM_ASCII) QString &operator+=(const char *s); QString &operator+=(const QByteArray &s); QString(const char *ch); |