diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-10-26 12:00:43 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-10-26 12:00:43 (GMT) |
commit | 85f3f3ac74a2e7fe6a0874a46f9358a15f0dab34 (patch) | |
tree | 191b227596f18333f1609ff824d2746dd7f1090f /src/corelib/tools | |
parent | 26139fcacc05b4a74fce1ef4e0db819118765310 (diff) | |
parent | 2d071521228a6bc9ef423cbdbbd8560d28208790 (diff) | |
download | Qt-85f3f3ac74a2e7fe6a0874a46f9358a15f0dab34.zip Qt-85f3f3ac74a2e7fe6a0874a46f9358a15f0dab34.tar.gz Qt-85f3f3ac74a2e7fe6a0874a46f9358a15f0dab34.tar.bz2 |
Merge remote branch 'qt/master' into lighthouse-master
Conflicts:
src/opengl/qwindowsurface_gl.cpp
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qalgorithms.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qbytearray.cpp | 4 | ||||
-rw-r--r-- | src/corelib/tools/qcache.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qdatetime.cpp | 1 | ||||
-rw-r--r-- | src/corelib/tools/qelapsedtimer.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qiterator.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qlinkedlist.cpp | 4 | ||||
-rw-r--r-- | src/corelib/tools/qlist.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qpair.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qset.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qsharedpointer.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/qsharedpointer_impl.h | 14 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/qvarlengtharray.qdoc | 10 |
14 files changed, 54 insertions, 45 deletions
diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc index 4a4f592..898f940 100644 --- a/src/corelib/tools/qalgorithms.qdoc +++ b/src/corelib/tools/qalgorithms.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 6be3416..6ba9fd3 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -1816,7 +1816,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); } @@ -1857,7 +1857,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/qcache.qdoc b/src/corelib/tools/qcache.qdoc index 71e0483..0a3c971 100644 --- a/src/corelib/tools/qcache.qdoc +++ b/src/corelib/tools/qcache.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index ab7530d..c252e64 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -1630,6 +1630,7 @@ QString QTime::toString(Qt::DateFormat format) const \endtable If the datetime is invalid, an empty string will be returned. + If \a format is empty, the default format "hh:mm:ss" is used. \sa QDate::toString() QDateTime::toString() */ diff --git a/src/corelib/tools/qelapsedtimer.cpp b/src/corelib/tools/qelapsedtimer.cpp index 4adddf9..28d3450 100644 --- a/src/corelib/tools/qelapsedtimer.cpp +++ b/src/corelib/tools/qelapsedtimer.cpp @@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE function, which can be used to determine if a certain number of milliseconds has already elapsed: - \snippet doc/src/snippets/qelapsedtimer/main.cpp 1 + \snippet doc/src/snippets/qelapsedtimer/main.cpp 2 \section1 Reference clocks diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc index 1e7637b..9cec7ec 100644 --- a/src/corelib/tools/qiterator.qdoc +++ b/src/corelib/tools/qiterator.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp index 909d940..7213c6e 100644 --- a/src/corelib/tools/qlinkedlist.cpp +++ b/src/corelib/tools/qlinkedlist.cpp @@ -254,7 +254,7 @@ QLinkedListData QLinkedListData::shared_null = { \sa insert() */ -/*! +/*! \fn bool QLinkedList::removeOne(const T &value) \since 4.4 @@ -830,7 +830,7 @@ QLinkedListData QLinkedListData::shared_null = { QLinkedList\<T\>::const_iterator allows you to iterate over a QLinkedList\<T\>. If you want modify the QLinkedList as you iterate - over it, you must use QLinkedList::const_iterator instead. It is + over it, you must use QLinkedList::iterator instead. It is generally good practice to use QLinkedList::const_iterator on a non-const QLinkedList as well, unless you need to change the QLinkedList through the iterator. Const iterators are slightly diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 6cc6fc1..9ba3768 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -936,7 +936,7 @@ void **QListData::erase(void **xi) This function requires the value type to have an implementation of \c operator==(). - Note that QList uses 0-based indexes, just like C++ arrays. Negative + Note that QList uses 0-based indexes, just like C++ arrays. Negative indexes are not supported with the exception of the value mentioned above. diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc index d49c09e..4ef151e 100644 --- a/src/corelib/tools/qpair.qdoc +++ b/src/corelib/tools/qpair.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc index d1aca4c..0bc2d2d 100644 --- a/src/corelib/tools/qset.qdoc +++ b/src/corelib/tools/qset.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index 8f9559a..3cc9c45 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -395,7 +395,7 @@ \section1 Tracking QObject - QWeakPointer can be used to track deletion classes derives from QObject, + QWeakPointer can be used to track deletion classes that derive from QObject, even if they are not managed by QSharedPointer. When used in that role, QWeakPointer replaces the older QPointer in all use-cases. QWeakPointer is also more efficient than QPointer, so it should be preferred in all @@ -1163,7 +1163,7 @@ \since 4.6 \brief The qSharedPointerObjectCast function is for casting a shared pointer. - + Returns a shared pointer to the pointer held by \a other, using a \l qobject_cast() to type \tt X to obtain an internal pointer of the appropriate type. If the \tt qobject_cast fails, the object @@ -1430,7 +1430,7 @@ void QtSharedPointer::internalSafetyCheckAdd2(const void *d_ptr, const volatile Q_ASSERT(!kp->dPointers.contains(d_ptr)); //qDebug("Adding d=%p value=%p", d_ptr, ptr); - + const void *other_d_ptr = kp->dataPointers.value(ptr, 0); if (other_d_ptr) { # ifdef BACKTRACE_SUPPORTED diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index 20dda12..4b47713 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -376,6 +376,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> @@ -453,11 +460,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/qstring.cpp b/src/corelib/tools/qstring.cpp index cfffc4a..30ef9de 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -579,7 +579,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 @@ -3906,7 +3906,7 @@ QString QString::fromLocal8Bit(const char *str, int size) /*! Returns a QString initialized with the first \a size characters - of the 8-bit string \a str. + from the string \a str. If \a size is -1 (default), it is taken to be qstrlen(\a str). @@ -4290,7 +4290,7 @@ QString& QString::fill(QChar ch, int size) Returns the number of characters in this string. Equivalent to size(). - \sa setLength() + \sa resize() */ /*! diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc index cbd81c7..6f91bcc 100644 --- a/src/corelib/tools/qvarlengtharray.qdoc +++ b/src/corelib/tools/qvarlengtharray.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free |