summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 4968782847..09b68f0943 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -71,6 +71,7 @@
#include <new>
#include <mutex>
+#include <memory>
#include <ctype.h>
#include <limits.h>
@@ -125,7 +126,7 @@ static int *queuedConnectionTypes(const QMetaMethod &method)
static int *queuedConnectionTypes(const QArgumentType *argumentTypes, int argc)
{
- QScopedArrayPointer<int> types(new int[argc + 1]);
+ auto types = std::make_unique<int[]>(argc + 1);
for (int i = 0; i < argc; ++i) {
const QArgumentType &type = argumentTypes[i];
if (type.type())
@@ -145,7 +146,7 @@ static int *queuedConnectionTypes(const QArgumentType *argumentTypes, int argc)
}
types[argc] = 0;
- return types.take();
+ return types.release();
}
static QBasicMutex _q_ObjectMutexPool[131];