aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2016-08-02 12:49:06 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-08-03 09:08:41 +0000
commitfa50403ab39a9f4549bf0cc56d07a8717eb177ae (patch)
tree2ed3c8c49a3f69ed079f4e95761bf1a81f367f04 /tests/auto/qml/debugger
parentc25c95ba22ef843d09b22f9524a04585dc26f2bd (diff)
QML debugger: Fix test
Use delete[] on a new[]-ed pointer. Change-Id: Ic5721851bdcec284cdd631b81d2cc96b7a1748fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/debugger')
-rw-r--r--tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
index 4568d25dc1..40e19d375d 100644
--- a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
+++ b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
@@ -1223,16 +1223,15 @@ void tst_QQmlEngineDebugService::queryObjectTree()
int main(int argc, char *argv[])
{
int _argc = argc + 1;
- char **_argv = new char*[_argc];
+ QScopedArrayPointer<char *>_argv(new char*[_argc]);
for (int i = 0; i < argc; ++i)
_argv[i] = argv[i];
char arg[] = "-qmljsdebugger=port:3768,services:QmlDebugger";
_argv[_argc - 1] = arg;
- QGuiApplication app(_argc, _argv);
+ QGuiApplication app(_argc, _argv.data());
tst_QQmlEngineDebugService tc;
- return QTest::qExec(&tc, _argc, _argv);
- delete _argv;
+ return QTest::qExec(&tc, _argc, _argv.data());
}
#include "tst_qqmlenginedebugservice.moc"