summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qvector.h2
-rw-r--r--tests/auto/qlist/tst_qlist.cpp2
-rw-r--r--tests/auto/qvector/tst_qvector.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 7eee33d..c16aefb 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -439,7 +439,7 @@ QVector<T>::QVector(int asize, const T &t)
template <typename T>
QVector<T>::QVector(std::initializer_list<T> args)
{
- p = malloc(args.size());
+ d = malloc(args.size());
d->ref = 1;
d->alloc = d->size = args.size();
d->sharable = true;
diff --git a/tests/auto/qlist/tst_qlist.cpp b/tests/auto/qlist/tst_qlist.cpp
index 9f6b4a5..14b8057 100644
--- a/tests/auto/qlist/tst_qlist.cpp
+++ b/tests/auto/qlist/tst_qlist.cpp
@@ -666,7 +666,7 @@ void tst_QList::testSTLIterators() const
void tst_QList::initializeList() const
{
-#ifdef QT_CXX0X_INITIALIZERLIST
+#ifdef Q_COMPILER_INITIALIZER_LISTS
QList<int> v1{2,3,4};
QCOMPARE(v1, QList<int>() << 2 << 3 << 4);
QCOMPARE(v1, (QList<int>{2,3,4}));
diff --git a/tests/auto/qvector/tst_qvector.cpp b/tests/auto/qvector/tst_qvector.cpp
index d8dfacf..a04ce60 100644
--- a/tests/auto/qvector/tst_qvector.cpp
+++ b/tests/auto/qvector/tst_qvector.cpp
@@ -837,7 +837,7 @@ void tst_QVector::QTBUG6416_reserve()
void tst_QVector::initializeList()
{
-#ifdef QT_CXX0X_INITIALIZERLIST
+#ifdef Q_COMPILER_INITIALIZER_LISTS
QVector<int> v1{2,3,4};
QCOMPARE(v1, QVector<int>() << 2 << 3 << 4);
QCOMPARE(v1, (QVector<int>{2,3,4}));