From cfb05fae2570053994d9827ba04066656ffd7fe0 Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner Date: Thu, 24 Dec 2015 12:04:31 +0100 Subject: [PATCH] Changes for PR #31 --- lib/src/DOtherSide.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/DOtherSide.cpp b/lib/src/DOtherSide.cpp index 542c04f..e5c546e 100644 --- a/lib/src/DOtherSide.cpp +++ b/lib/src/DOtherSide.cpp @@ -109,12 +109,12 @@ void dos_qqmlapplicationengine_context(void* vptr, void** context) void dos_qqmlapplicationengine_rootObjects(void* vptr, void*** array, int* array_length) { QQmlApplicationEngine* engine = reinterpret_cast(vptr); - auto list = engine->rootObjects(); + QList list = engine->rootObjects(); // Note: On fringe architectures where `8 < CHAR_BIT` this may not allocate enough memory, // as sizeof returns the number of chars required, while calloc/malloc expects // the number of octets required. QObject** objects = reinterpret_cast(calloc(list.length(), sizeof(QObject*))); - if (objects == NULL) return; + if (objects == nullptr) return; for (int i = 0; i < list.length(); i += 1) objects[i] = list.at(i); *array = reinterpret_cast(objects); *array_length = list.length();