From 463d765e6f7e77c921440bfe76fd246771192f8b Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 31 Aug 2011 09:05:00 +0200 Subject: [PATCH] Autotests: Silence gdb warning about deprecated conversion MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix "warning: deprecated conversion from string constant to ‘char*" Change-Id: Ie8a4b0caba351e5920cc7d3249ee023bfe7675bc Reviewed-on: http://codereview.qt.nokia.com/3934 Reviewed-by: Qt Sanity Bot Reviewed-by: Aurindam Jana --- tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp | 3 ++- .../qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp | 3 ++- .../qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index b47579e..a5a5009 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -1209,7 +1209,8 @@ int main(int argc, char *argv[]) char **_argv = new char*[_argc]; for (int i = 0; i < argc; ++i) _argv[i] = argv[i]; - _argv[_argc - 1] = "-qmljsdebugger=port:3768"; + char arg[] = "-qmljsdebugger=port:3768"; + _argv[_argc - 1] = arg; QApplication app(_argc, _argv); tst_QDeclarativeDebug tc; diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index d7f53c9..2ad50b1 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -144,7 +144,8 @@ int main(int argc, char *argv[]) char **_argv = new char*[_argc]; for (int i = 0; i < argc; ++i) _argv[i] = argv[i]; - _argv[_argc - 1] = "-qmljsdebugger=port:13770"; + char arg[] = "-qmljsdebugger=port:13770"; + _argv[_argc - 1] = arg; QApplication app(_argc, _argv); tst_QDeclarativeDebugClient tc; diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index 74f549c..3a285e0 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -189,7 +189,8 @@ int main(int argc, char *argv[]) char **_argv = new char*[_argc]; for (int i = 0; i < argc; ++i) _argv[i] = argv[i]; - _argv[_argc - 1] = "-qmljsdebugger=port:13769"; + char arg[] = "-qmljsdebugger=port:13769"; + _argv[_argc - 1] = arg; QApplication app(_argc, _argv); tst_QDeclarativeDebugService tc; -- 2.7.4