summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-29 09:21:38 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-29 07:36:11 +0000
commit318f62748bc02f5b57fe1292faee55c4ba1bab6a (patch)
tree2a9d8c03d9a889e8bdd8bd77627e1de3ac360681 /tests
parent93cb98417470d7172ac31df2c12634c5969c43e7 (diff)
tst_QApplication: Remove test windowsCommandLine().
According to history, the test was supposed to verify the correct parsing of the command line on Windows by the qWinCmdLine() function in corelib. It did not test anything since the test application printed out argv[1] instead of QCoreApplication::arguments()[1]. Since qWinCmdLine() has been replaced by the WinAPI CommandLineToArgvW(), the test no longer makes sense and also starts to fail then warnings are printed to the error output. Change-Id: Idf642783ebb56eaa8fba9004174557485563a84f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/kernel/qapplication/qapplication.pro1
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp36
-rw-r--r--tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp46
-rw-r--r--tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro5
4 files changed, 0 insertions, 88 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/qapplication.pro b/tests/auto/widgets/kernel/qapplication/qapplication.pro
index 3d167827a3..5154c915cd 100644
--- a/tests/auto/widgets/kernel/qapplication/qapplication.pro
+++ b/tests/auto/widgets/kernel/qapplication/qapplication.pro
@@ -2,6 +2,5 @@ TEMPLATE = subdirs
SUBDIRS = desktopsettingsaware modal
-win32:!wince: SUBDIRS += wincmdline
test.depends += $$SUBDIRS
SUBDIRS += test
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 84956d0a02..824fe0f6ba 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -162,9 +162,6 @@ private slots:
void setAttribute();
- void windowsCommandLine_data();
- void windowsCommandLine();
-
void touchEventPropagation();
void qtbug_12673();
@@ -1933,39 +1930,6 @@ void tst_QApplication::setAttribute()
delete w;
}
-void tst_QApplication::windowsCommandLine_data()
-{
-#if defined(Q_OS_WIN)
- QTest::addColumn<QString>("args");
- QTest::addColumn<QString>("expected");
-
- QTest::newRow("hello world")
- << QString("Hello \"World\"")
- << QString("Hello \"World\"");
- QTest::newRow("sql")
- << QString("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'PNR' AND TABLE_TYPE = 'VIEW' ORDER BY TABLE_NAME")
- << QString("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'PNR' AND TABLE_TYPE = 'VIEW' ORDER BY TABLE_NAME");
-#endif
-}
-
-void tst_QApplication::windowsCommandLine()
-{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
- QFETCH(QString, args);
- QFETCH(QString, expected);
-
- QProcess testProcess;
- const QString path = QStringLiteral("wincmdline/wincmdline");
- testProcess.start(path, QStringList(args));
- QVERIFY2(testProcess.waitForStarted(),
- qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, testProcess.errorString())));
- QVERIFY(testProcess.waitForFinished(10000));
- QByteArray error = testProcess.readAllStandardError();
- QString procError(error);
- QCOMPARE(procError, expected);
-#endif
-}
-
class TouchEventPropagationTestWidget : public QWidget
{
Q_OBJECT
diff --git a/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp b/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
deleted file mode 100644
index 2d86b46875..0000000000
--- a/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <QApplication>
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- if (argc > 1)
- fprintf(stderr, "%s", argv[1]);
- else
- fprintf(stderr, "Failed");
- fflush(stderr);
- return 0;
-}
-
diff --git a/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro b/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro
deleted file mode 100644
index 3e32a6798d..0000000000
--- a/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-QT += widgets
-CONFIG -= app_bundle debug_and_release_target
-SOURCES += main.cpp
-DESTDIR = ./
-