diff options
author | David Boddie <david.boddie@nokia.com> | 2010-12-07 13:57:38 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2010-12-07 13:57:38 (GMT) |
commit | d8fb8ca3a378743eebb8464f7910a5e6d1870c01 (patch) | |
tree | 9c31a017163a532946f10107b8d9f4405ed1c9db /src/corelib/tools | |
parent | b5915ef3a6d0417440ad82e9369d6679505b953e (diff) | |
parent | 076bba6c901e292b61fffb7a91020075dcd84919 (diff) | |
download | Qt-d8fb8ca3a378743eebb8464f7910a5e6d1870c01.zip Qt-d8fb8ca3a378743eebb8464f7910a5e6d1870c01.tar.gz Qt-d8fb8ca3a378743eebb8464f7910a5e6d1870c01.tar.bz2 |
Merge branch 'qdoc-simplified' into mimir-simplified
Conflicts:
doc/src/platforms/compiler-notes.qdoc
tools/qdoc3/ditaxmlgenerator.cpp
tools/qdoc3/ditaxmlgenerator.h
tools/qdoc3/htmlgenerator.cpp
tools/qdoc3/htmlgenerator.h
tools/qdoc3/node.cpp
tools/qdoc3/pagegenerator.h
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qbytearray.cpp | 4 | ||||
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 9 | ||||
-rw-r--r-- | src/corelib/tools/qlocale.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qpoint.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/qsharedpointer_impl.h | 14 | ||||
-rw-r--r-- | src/corelib/tools/qsimd.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qsimd_p.h | 11 | ||||
-rw-r--r-- | src/corelib/tools/qsize.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 4 |
9 files changed, 39 insertions, 19 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index b0c784e..fac0f45 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -1812,7 +1812,7 @@ QByteArray &QByteArray::replace(int pos, int len, const QByteArray &after) return *this; } else { QByteArray copy(after); - // ### optimise me + // ### optimize me remove(pos, len); return insert(pos, copy); } @@ -1853,7 +1853,7 @@ QByteArray &QByteArray::replace(int pos, int len, const char *after, int alen) } } -// ### optimise all other replace method, by offering +// ### optimize all other replace method, by offering // QByteArray::replace(const char *before, int blen, const char *after, int alen) /*! diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 6b1de5e..b817eb2 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -77,7 +77,7 @@ QT_END_NAMESPACE #include <qdebug.h> #include <time.h> -#if defined(Q_OS_LINUX) && !defined(__UCLIBC__) +#if defined(__GLIBC__) && !defined(__UCLIBC__) # include <fenv.h> #endif @@ -1576,8 +1576,6 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l) defaults to the default locale (see setDefault()). \endlist - The "C" locale is identical in behavior to \l{English}/\l{UnitedStates}. - Use language() and country() to determine the actual language and country values used. @@ -6637,7 +6635,7 @@ Q_CORE_EXPORT char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *si _control87(MCW_EM, MCW_EM); #endif -#if defined(Q_OS_LINUX) && !defined(__UCLIBC__) +#if defined(__GLIBC__) && !defined(__UCLIBC__) fenv_t envp; feholdexcept(&envp); #endif @@ -6653,7 +6651,7 @@ Q_CORE_EXPORT char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *si #endif //_M_X64 #endif //Q_OS_WIN -#if defined(Q_OS_LINUX) && !defined(__UCLIBC__) +#if defined(__GLIBC__) && !defined(__UCLIBC__) fesetenv(&envp); #endif @@ -7308,6 +7306,7 @@ Q_CORE_EXPORT char *qdtoa( double d, int mode, int ndigits, int *decpt, int *sig Q_CORE_EXPORT double qstrtod(const char *s00, const char **se, bool *ok) { + errno = 0; double ret = strtod((char*)s00, (char**)se); if (ok) { if((ret == 0.0l && errno == ERANGE) diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h index 8b424bb..1af2cb4 100644 --- a/src/corelib/tools/qlocale.h +++ b/src/corelib/tools/qlocale.h @@ -114,7 +114,7 @@ class Q_CORE_EXPORT QLocale friend class QString; friend class QByteArray; friend class QIntValidator; - friend class QDoubleValidator; + friend class QDoubleValidatorPrivate; friend class QTextStream; friend class QTextStreamPrivate; diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp index 66f06e9..c297709 100644 --- a/src/corelib/tools/qpoint.cpp +++ b/src/corelib/tools/qpoint.cpp @@ -438,8 +438,12 @@ QDebug operator<<(QDebug d, const QPointF &p) /*! \fn bool QPointF::isNull() const - Returns true if both the x and y coordinates are set to 0.0, + Returns true if both the x and y coordinates are set to +0.0; otherwise returns false. + + \note Since this function treats +0.0 and -0.0 differently, points + with zero-valued coordinates where either or both values have a + negative sign are not defined to be null points. */ diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index 4cce339..2895bba 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -378,6 +378,13 @@ namespace QtSharedPointer { inline ExternalRefCount() : d(0) { } inline ExternalRefCount(Qt::Initialization i) : Basic<T>(i) { } + + inline ExternalRefCount(T *ptr) : Basic<T>(Qt::Uninitialized) // throws + { internalConstruct(ptr); } + template <typename Deleter> + inline ExternalRefCount(T *ptr, Deleter deleter) : Basic<T>(Qt::Uninitialized) // throws + { internalConstruct(ptr, deleter); } + inline ExternalRefCount(const ExternalRefCount<T> &other) : Basic<T>(other), d(other.d) { if (d) ref(); } template <class X> @@ -448,11 +455,12 @@ public: inline QSharedPointer() { } // inline ~QSharedPointer() { } - inline explicit QSharedPointer(T *ptr) : BaseClass(Qt::Uninitialized) - { BaseClass::internalConstruct(ptr); } + inline explicit QSharedPointer(T *ptr) : BaseClass(ptr) // throws + { } template <typename Deleter> - inline QSharedPointer(T *ptr, Deleter d) { BaseClass::internalConstruct(ptr, d); } + inline QSharedPointer(T *ptr, Deleter d) : BaseClass(ptr, d) // throws + { } inline QSharedPointer(const QSharedPointer<T> &other) : BaseClass(other) { } inline QSharedPointer<T> &operator=(const QSharedPointer<T> &other) diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index b2fe2da..63ebafb 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -135,7 +135,7 @@ static inline uint detectProcessorFeatures() #if defined(QT_HAVE_IWMMXT) // runtime detection only available when running as a previlegied process features = IWMMXT; -#elif defined(QT_HAVE_NEON) +#elif defined(QT_ALWAYS_HAVE_NEON) features = NEON; #endif diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 664543b..2dbed76 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -87,9 +87,13 @@ QT_BEGIN_HEADER #include <tmmintrin.h> #endif -// SSE4.1 and SSE4.2 intrinsics -#if (defined(QT_HAVE_SSE4_1) || defined(QT_HAVE_SSE4_2)) && (defined(__SSE4_1__) || defined(Q_CC_MSVC)) +// SSE4.1 intrinsics +#if defined(QT_HAVE_SSE4_1) && (defined(__SSE4_1__) || defined(Q_CC_MSVC)) #include <smmintrin.h> +#endif + +// SSE4.2 intrinsics +#if defined(QT_HAVE_SSE4_2) && (defined(__SSE4_2__) || defined(Q_CC_MSVC)) #include <nmmintrin.h> #endif @@ -105,7 +109,8 @@ QT_BEGIN_HEADER #endif // defined(QT_HAVE_SSE2) && (defined(__SSE2__) || defined(Q_CC_MSVC)) // NEON intrinsics -#if defined(QT_HAVE_NEON) +#if defined __ARM_NEON__ +#define QT_ALWAYS_HAVE_NEON #include <arm_neon.h> #endif diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp index 20ac344..12287ab 100644 --- a/src/corelib/tools/qsize.cpp +++ b/src/corelib/tools/qsize.cpp @@ -492,9 +492,13 @@ QDebug operator<<(QDebug dbg, const QSize &s) { /*! \fn bool QSizeF::isNull() const - Returns true if both the width and height is 0; otherwise returns + Returns true if both the width and height are +0.0; otherwise returns false. + \note Since this function treats +0.0 and -0.0 differently, sizes with + zero width and height where either or both values have a negative + sign are not defined to be null sizes. + \sa isValid(), isEmpty() */ diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 8083aee..114c4ee 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -567,7 +567,7 @@ const QString::Null QString::null = { }; strings from a string list that contain a particular substring or that match a particular QRegExp using the QStringList::filter() function. -: + \section1 Querying String Data If you want to see if a QString starts or ends with a particular @@ -3573,7 +3573,7 @@ static QByteArray toLatin1_helper(const QChar *data, int length) } length = length % 16; } -#elif QT_HAVE_NEON +#elif defined(QT_ALWAYS_HAVE_NEON) // Refer to the documentation of the SSE2 implementation // this use eactly the same method as for SSE except: // 1) neon has unsigned comparison |