diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-12-05 11:54:03 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-08 03:04:55 +0100 |
commit | ad80d42f8eefd72d9297c272139acc70e24bfa13 (patch) | |
tree | 4392ffb6762f80bb81b1a126371debfcb6566b13 /src/testlib/qtestcase.cpp | |
parent | 479fc3e49c4b7e2a5d447c2d0d1c260d2cfb0966 (diff) |
Remove unused overload of QTest::qExec.
The overload of QTest::qExec() that takes a QStringList is not used
anywhere in Qt's autotests, despite having been in the qtestlib API
since Qt 4.4.
This lack of use most likely derives from the fact that none of the
QTEST_MAIN macros use the overload, and more than 99% of Qt's tests
use those macros to avoid explicitly calling QTest::qExec().
Change-Id: I264b21d7fe1a9f2d565f748cf8bbe32414a73bb0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r-- | src/testlib/qtestcase.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 742161be04..b37dbc0203 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1927,10 +1927,6 @@ FatalSignalHandler::~FatalSignalHandler() test that was executed with qExec() can't run another test via qExec() and threads are not allowed to call qExec() simultaneously. - If you have programatically created the arguments, as opposed to getting them - from the arguments in \c main(), it is likely of interest to use - QTest::qExec(QObject *, const QStringList &) since it is Unicode safe. - \sa QTEST_MAIN() */ @@ -2040,30 +2036,6 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) return qMin(QTestResult::failCount(), 127); } -/*! - \overload - \since 4.4 - - Behaves identically to qExec(QObject *, int, char**) but takes a - QStringList of \a arguments instead of a \c char** list. - */ -int QTest::qExec(QObject *testObject, const QStringList &arguments) -{ - const int argc = arguments.count(); - QVarLengthArray<char *> argv(argc); - - QVector<QByteArray> args; - args.reserve(argc); - - for (int i = 0; i < argc; ++i) - { - args.append(arguments.at(i).toLocal8Bit().constData()); - argv[i] = args.last().data(); - } - - return qExec(testObject, argc, argv.data()); -} - /*! \internal */ void QTest::qFail(const char *statementStr, const char *file, int line) |