summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorSarah Smith <sarah.j.smith@nokia.com>2009-09-09 01:16:30 (GMT)
committerSarah Smith <sarah.j.smith@nokia.com>2009-09-09 01:16:30 (GMT)
commitc5be02430eda5a555114ef332a389b7621904b17 (patch)
treea428a79a5618a95de48f22bb4b40a8dbdb8816ae /src/corelib/tools
parent693695e5677422625d555943586d41fbd9dbe971 (diff)
parent03050f1495a9071a7123ed70caff83466df8c6e5 (diff)
downloadQt-c5be02430eda5a555114ef332a389b7621904b17.zip
Qt-c5be02430eda5a555114ef332a389b7621904b17.tar.gz
Qt-c5be02430eda5a555114ef332a389b7621904b17.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qlist.h19
-rw-r--r--src/corelib/tools/qtimeline.cpp4
2 files changed, 16 insertions, 7 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index c2bdbee..f316fec 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -367,21 +367,26 @@ Q_INLINE_TEMPLATE void QList<T>::node_copy(Node *from, Node *to, Node *src)
if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
QT_TRY {
while(current != to) {
- (current++)->v = new T(*reinterpret_cast<T*>((src++)->v));
+ current->v = new T(*reinterpret_cast<T*>(src->v));
+ ++current;
+ ++src;
}
} QT_CATCH(...) {
- while (current != from)
- delete reinterpret_cast<T*>(current--);
+ while (current-- != from)
+ delete reinterpret_cast<T*>(current->v);
QT_RETHROW;
}
} else if (QTypeInfo<T>::isComplex) {
QT_TRY {
- while(current != to)
- new (current++) T(*reinterpret_cast<T*>(src++));
+ while(current != to) {
+ new (current) T(*reinterpret_cast<T*>(src));
+ ++current;
+ ++src;
+ }
} QT_CATCH(...) {
- while (current != from)
- (reinterpret_cast<T*>(current--))->~T();
+ while (current-- != from)
+ (reinterpret_cast<T*>(current))->~T();
QT_RETHROW;
}
} else {
diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp
index 052c456..28ec963 100644
--- a/src/corelib/tools/qtimeline.cpp
+++ b/src/corelib/tools/qtimeline.cpp
@@ -388,6 +388,10 @@ void QTimeLine::setDirection(Direction direction)
By default, this value is 1000 (i.e., 1 second), but you can change this
by either passing a duration to QTimeLine's constructor, or by calling
setDuration(). The duration must be larger than 0.
+
+ \note Changing the duration does not cause the current time to be reset
+ to zero or the new duration. You also need to call setCurrentTime() with
+ the desired value.
*/
int QTimeLine::duration() const
{