diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-05-31 12:35:39 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-01 12:27:37 +0200 |
commit | 5a447502b539c10a399f9d6579efbae6ef5ca9f0 (patch) | |
tree | 6e0aede2444cb68fe1f26d410ac0c43bf0239e66 /tests/auto/corelib/tools/qarraydata | |
parent | 9c5a77f0ef0b2ace0b11719142115eded4a7c05e (diff) |
Fix the QVector build with C++11 initialiser lists
Initialiser lists were not tested before in the QVector rewrite, so
the older malloc call was left behind.
Also, std::initializer_list has const iterators returning const data
and broke the build in a few places where const qualifiers were
missing.
Change-Id: I3c04e58361989aa7438621cda63c7df457d7dad8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qarraydata')
-rw-r--r-- | tests/auto/corelib/tools/qarraydata/simplevector.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qarraydata/simplevector.h b/tests/auto/corelib/tools/qarraydata/simplevector.h index 7e679704c8..f708fc12d1 100644 --- a/tests/auto/corelib/tools/qarraydata/simplevector.h +++ b/tests/auto/corelib/tools/qarraydata/simplevector.h @@ -111,8 +111,8 @@ public: iterator begin() { detach(); return d->begin(); } iterator end() { detach(); return d->end(); } - const_iterator begin() const { return d->begin(); } - const_iterator end() const { return d->end(); } + const_iterator begin() const { return d->constBegin(); } + const_iterator end() const { return d->constEnd(); } const_iterator constBegin() const { return begin(); } const_iterator constEnd() const { return end(); } |