summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-11 11:38:17 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-11 11:38:17 (GMT)
commit65f5cecdd0343d816d9abb8342bd8b2faecdf3b8 (patch)
treed362d9a545dca4a1c636589767624fccea495cef /src
parent5eeb8abdf5eb81abf4700190b846bf8236cdcd93 (diff)
parentfbb600a7a92b60b388406fecf2d8a94f0d4f5586 (diff)
downloadQt-65f5cecdd0343d816d9abb8342bd8b2faecdf3b8.zip
Qt-65f5cecdd0343d816d9abb8342bd8b2faecdf3b8.tar.gz
Qt-65f5cecdd0343d816d9abb8342bd8b2faecdf3b8.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QVarLenghtArray: Call constructor when resizing the array for Movable types.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qvarlengtharray.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h
index 1069b816..aecb66e 100644
--- a/src/corelib/tools/qvarlengtharray.h
+++ b/src/corelib/tools/qvarlengtharray.h
@@ -222,7 +222,6 @@ Q_OUTOFLINE_TEMPLATE void QVarLengthArray<T, Prealloc>::realloc(int asize, int a
}
} else {
qMemCopy(ptr, oldPtr, qMin(asize, osize) * sizeof(T));
- s = asize;
}
} else {
ptr = oldPtr;
@@ -233,7 +232,7 @@ Q_OUTOFLINE_TEMPLATE void QVarLengthArray<T, Prealloc>::realloc(int asize, int a
if (QTypeInfo<T>::isComplex) {
while (osize > asize)
(oldPtr+(--osize))->~T();
- if( oldPtr == ptr )
+ if (!QTypeInfo<T>::isStatic)
s = osize;
}