From: Kent Hansen Date: Mon, 19 Mar 2012 09:03:48 +0000 (+0100) Subject: Merge master into api_changes X-Git-Tag: 071012110112~1235^2^2~253 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95d6f8a4cf3fba2fd675f0e6b5de0ce1d702da26;p=profile%2Fivi%2Fqtbase.git Merge master into api_changes Conflicts: src/corelib/tools/qvector.h tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6 --- 95d6f8a4cf3fba2fd675f0e6b5de0ce1d702da26 diff --cc src/corelib/tools/qvector.h index c119ef4,09aabe5..226d0bb --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@@ -246,12 -243,14 +246,14 @@@ public typedef T* iterator; typedef const T* const_iterator; #endif - inline iterator begin() { detach(); return p->array; } - inline const_iterator begin() const { return p->array; } - inline const_iterator cbegin() const { return p->array; } - inline const_iterator constBegin() const { return p->array; } - inline iterator end() { detach(); return p->array + d->size; } - inline const_iterator end() const { return p->array + d->size; } - inline const_iterator cend() const { return p->array + d->size; } - inline const_iterator constEnd() const { return p->array + d->size; } + inline iterator begin() { detach(); return d->begin(); } + inline const_iterator begin() const { return d->begin(); } ++ inline const_iterator cbegin() const { return d->begin(); } + inline const_iterator constBegin() const { return d->begin(); } + inline iterator end() { detach(); return d->end(); } + inline const_iterator end() const { return d->end(); } ++ inline const_iterator cend() const { return d->end(); } + inline const_iterator constEnd() const { return d->end(); } iterator insert(iterator before, int n, const T &x); inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); } iterator erase(iterator begin, iterator end); diff --cc tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index 942d41d,d93e00e..b22a3d5 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@@ -660,13 -629,19 +660,21 @@@ FOR_EACH_CORE_METATYPE(RETURN_CREATE_CO void tst_QMetaType::sizeOf_data() { QTest::addColumn("type"); - QTest::addColumn("size"); + QTest::addColumn("size"); + - QTest::newRow("QMetaType::UnknownType") << QMetaType::UnknownType << 0; ++ QTest::newRow("QMetaType::UnknownType") << QMetaType::UnknownType << size_t(0); #define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \ - QTest::newRow(#RealType) << QMetaType::MetaTypeName << int(QTypeInfo::sizeOf); + QTest::newRow(#RealType) << QMetaType::MetaTypeName << size_t(QTypeInfo::sizeOf); FOR_EACH_CORE_METATYPE(ADD_METATYPE_TEST_ROW) #undef ADD_METATYPE_TEST_ROW + + QTest::newRow("Whity") << static_cast(::qMetaTypeId >()) << sizeof(Whity); + QTest::newRow("Whity") << static_cast(::qMetaTypeId >()) << sizeof(Whity); + QTest::newRow("Testspace::Foo") << static_cast(::qMetaTypeId()) << sizeof(TestSpace::Foo); + + QTest::newRow("-1") << QMetaType::Type(-1) << size_t(0); + QTest::newRow("-124125534") << QMetaType::Type(-124125534) << size_t(0); + QTest::newRow("124125534") << QMetaType::Type(124125534) << size_t(0); } void tst_QMetaType::sizeOf()