diff options
author | David Skoland <david.skoland@qt.io> | 2020-11-26 17:31:50 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-12-22 15:20:30 +0100 |
commit | 27d96b4789b98587e64642bf7bd6ef5f3a07e174 (patch) | |
tree | 24db364d54a9b64a959b14bc5cc2bd3c64d5ccc7 /tests/auto/gui/kernel | |
parent | bbebfa0be2e51b638459d6d812e4db25a65a0d6d (diff) |
Replace QtTest headers with QTest
Complete search and replace of QtTest and QtTest/QtTest with QTest, as
QtTest includes the whole module. Replace all such instances with
correct header includes. See Jira task for more discussion.
Fixes: QTBUG-88831
Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/gui/kernel')
29 files changed, 43 insertions, 30 deletions
diff --git a/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp b/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp index 3e19764618..eba4aa4790 100644 --- a/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp +++ b/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp @@ -26,7 +26,7 @@ ** ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <QEvent> #include <QtCore/qthread.h> diff --git a/tests/auto/gui/kernel/qaction/tst_qaction.cpp b/tests/auto/gui/kernel/qaction/tst_qaction.cpp index 277e86d1be..7f817a5c98 100644 --- a/tests/auto/gui/kernel/qaction/tst_qaction.cpp +++ b/tests/auto/gui/kernel/qaction/tst_qaction.cpp @@ -26,7 +26,9 @@ ** ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> +#include <QSignalSpy> +#include <QFont> #include <qguiapplication.h> #include <qevent.h> diff --git a/tests/auto/gui/kernel/qactiongroup/tst_qactiongroup.cpp b/tests/auto/gui/kernel/qactiongroup/tst_qactiongroup.cpp index 52720ab7ff..8ac3a0b4c7 100644 --- a/tests/auto/gui/kernel/qactiongroup/tst_qactiongroup.cpp +++ b/tests/auto/gui/kernel/qactiongroup/tst_qactiongroup.cpp @@ -26,7 +26,7 @@ ** ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <qaction.h> #include <qactiongroup.h> diff --git a/tests/auto/gui/kernel/qaddpostroutine/tst_qaddpostroutine.cpp b/tests/auto/gui/kernel/qaddpostroutine/tst_qaddpostroutine.cpp index 500543d2e1..731547f681 100644 --- a/tests/auto/gui/kernel/qaddpostroutine/tst_qaddpostroutine.cpp +++ b/tests/auto/gui/kernel/qaddpostroutine/tst_qaddpostroutine.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <QTimer> static bool done = false; diff --git a/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp b/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp index b2dc8ee035..5349119b6d 100644 --- a/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp +++ b/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp @@ -30,7 +30,7 @@ #include <qbackingstore.h> #include <qpainter.h> -#include <QtTest/QtTest> +#include <QTest> #include <QEvent> diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp index 790b53ff9f..43596ed127 100644 --- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp +++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp @@ -27,7 +27,11 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> +#include <QMimeData> +#include <QSignalSpy> +#include <QProcess> + #include <QtCore/QDebug> #include <QtCore/QFileInfo> #include <QtCore/QDir> diff --git a/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp b/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp index 91ff24ffd1..5c243df6d0 100644 --- a/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp +++ b/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp @@ -27,7 +27,8 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> +#include <QMimeData> #include <qcoreapplication.h> #include <qdebug.h> diff --git a/tests/auto/gui/kernel/qevent/tst_qevent.cpp b/tests/auto/gui/kernel/qevent/tst_qevent.cpp index 50710a0475..6542ed5ad3 100644 --- a/tests/auto/gui/kernel/qevent/tst_qevent.cpp +++ b/tests/auto/gui/kernel/qevent/tst_qevent.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <QtCore/qcoreapplication.h> #include <QtCore/qcoreevent.h> diff --git a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp index 9da15b3e36..0e5c7927e0 100644 --- a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp +++ b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ #include <QtCore/QTemporaryDir> -#include <QtTest/QtTest> +#include <QTest> #include <QtGui/qevent.h> class tst_qfileopenevent : public QObject diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp index b68f00ea46..f970382db3 100644 --- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp +++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp @@ -27,7 +27,8 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> +#include <QSignalSpy> #include <QtGui/QGuiApplication> #include <QtGui/QWindow> #include <QtGui/QScreen> diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp index dc91b8792b..aac914bc68 100644 --- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp +++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp @@ -29,7 +29,7 @@ #include <QtCore> #include <QtGui> -#include <QtTest/QtTest> +#include <QTest> Q_DECLARE_METATYPE(QMetaType::Type) diff --git a/tests/auto/gui/kernel/qguivariant/no_application/main.cpp b/tests/auto/gui/kernel/qguivariant/no_application/main.cpp index 4a50c1f7da..1ab0f63240 100644 --- a/tests/auto/gui/kernel/qguivariant/no_application/main.cpp +++ b/tests/auto/gui/kernel/qguivariant/no_application/main.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <qvariant.h> diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp index 9ef5ce75bf..aea5cb3ac3 100644 --- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp +++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <qvariant.h> diff --git a/tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp b/tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp index c98864e9d9..13cdce6b12 100644 --- a/tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp +++ b/tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp @@ -29,7 +29,10 @@ #include <private/qhighdpiscaling_p.h> #include <qpa/qplatformscreen.h> -#include <QtTest/QtTest> +#include <QTest> +#include <QJsonArray> +#include <QJsonObject> +#include <QJsonDocument> Q_LOGGING_CATEGORY(lcTests, "qt.gui.tests") diff --git a/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp b/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp index 115bea996b..077a44b229 100644 --- a/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp +++ b/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp @@ -26,7 +26,7 @@ ** ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <qpa/qwindowsysteminterface.h> #include <QtGui/qinputdevice.h> #include <QtGui/qpointingdevice.h> diff --git a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp index d28dab3ad0..318309d959 100644 --- a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp +++ b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp @@ -26,7 +26,8 @@ ** ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> +#include <QSignalSpy> #include <private/qguiapplication_p.h> #include <private/qinputmethod_p.h> diff --git a/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp b/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp index 09becfe860..1873c190d5 100644 --- a/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp +++ b/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp @@ -26,7 +26,7 @@ ** ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <QtCore/qcoreapplication.h> #include <QtGui/qevent.h> diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp index 421fdc7933..58f0e6644e 100644 --- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <qkeysequence.h> #include <qpa/qplatformtheme.h> #include <qpa/qplatformtheme_p.h> diff --git a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp index c9cc956d35..d5174e0942 100644 --- a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp +++ b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <qevent.h> #include <qwindow.h> #include <QtGui/private/qpointingdevice_p.h> diff --git a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp index c430148a91..ec2a9729bb 100644 --- a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp +++ b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <qapplication.h> #include <qfontinfo.h> diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp index 2785d57a42..379034a20e 100644 --- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp +++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ #include <QtOpenGL/QOpenGLWindow> -#include <QtTest/QtTest> +#include <QTest> #include <QtGui/QOpenGLFunctions> #include <QtGui/QOpenGLContext> #include <QtGui/QPainter> diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp index cd968100e6..6524f73143 100644 --- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp +++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include "qpalette.h" diff --git a/tests/auto/gui/kernel/qpixelformat/tst_qpixelformat.cpp b/tests/auto/gui/kernel/qpixelformat/tst_qpixelformat.cpp index 14d2b74491..6372303290 100644 --- a/tests/auto/gui/kernel/qpixelformat/tst_qpixelformat.cpp +++ b/tests/auto/gui/kernel/qpixelformat/tst_qpixelformat.cpp @@ -25,7 +25,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <QtGui/qpixelformat.h> diff --git a/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp b/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp index deb4837956..f0725bff2d 100644 --- a/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp +++ b/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ #include <QtGui/QRasterWindow> -#include <QtTest/QtTest> +#include <QTest> #include <QtGui/QPainter> class tst_QRasterWindow : public QObject diff --git a/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp b/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp index 57444a3888..83d476e812 100644 --- a/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp +++ b/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp @@ -31,7 +31,8 @@ #include <qscreen.h> #include <qpa/qwindowsysteminterface.h> -#include <QtTest/QtTest> +#include <QTest> +#include <QSignalSpy> class tst_QScreen: public QObject { diff --git a/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp index cc0492666d..fc230f98e2 100644 --- a/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp +++ b/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp @@ -26,7 +26,7 @@ ** ****************************************************************************/ -#include <QtTest/QtTest> +#include <QTest> #include <QtGui/qguiapplication.h> #include <QtGui/qshortcut.h> #include <QtGui/qpainter.h> diff --git a/tests/auto/gui/kernel/qsurfaceformat/tst_qsurfaceformat.cpp b/tests/auto/gui/kernel/qsurfaceformat/tst_qsurfaceformat.cpp index 6fd768022c..f4410b2dae 100644 --- a/tests/auto/gui/kernel/qsurfaceformat/tst_qsurfaceformat.cpp +++ b/tests/auto/gui/kernel/qsurfaceformat/tst_qsurfaceformat.cpp @@ -28,7 +28,7 @@ #include <qsurfaceformat.h> -#include <QtTest/QtTest> +#include <QTest> class tst_QSurfaceFormat: public QObject { diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp index 8ef63154a8..28c33e8226 100644 --- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp +++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp @@ -32,7 +32,7 @@ #include <QtWidgets/QGraphicsView> #include <QtWidgets/QGraphicsWidget> #include <QtWidgets/QWidget> -#include <QtTest/QtTest> +#include <QTest> #include <qpa/qwindowsysteminterface.h> #include <qpa/qwindowsysteminterface_p.h> #include <private/qevent_p.h> diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 602e5a0178..e4f2223bfc 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -34,8 +34,8 @@ #include <private/qhighdpiscaling_p.h> #include <QtGui/QPainter> -#include <QtTest/QtTest> - +#include <QTest> +#include <QSignalSpy> #include <QEvent> #include <QStyleHints> |