summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorDavid Skoland <david.skoland@qt.io>2020-11-26 17:31:50 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-12-22 15:20:30 +0100
commit27d96b4789b98587e64642bf7bd6ef5f3a07e174 (patch)
tree24db364d54a9b64a959b14bc5cc2bd3c64d5ccc7 /tests/auto/widgets
parentbbebfa0be2e51b638459d6d812e4db25a65a0d6d (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/widgets')
-rw-r--r--tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp3
-rw-r--r--tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp5
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp5
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp6
-rw-r--r--tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qwizard/tst_qwizard_2.cpp2
-rw-r--r--tests/auto/widgets/effects/qpixmapfilter/tst_qpixmapfilter.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp6
-rw-r--r--tests/auto/widgets/kernel/qaction/tst_qaction.cpp3
-rw-r--r--tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp2
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp7
-rw-r--r--tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp6
-rw-r--r--tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp2
-rw-r--r--tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp3
-rw-r--r--tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp4
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp3
-rw-r--r--tests/auto/widgets/kernel/qwidgetmetatype/tst_qwidgetmetatype.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp2
-rw-r--r--tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp2
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp2
-rw-r--r--tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp2
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp2
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp3
-rw-r--r--tests/auto/widgets/util/qscroller/tst_qscroller.cpp2
-rw-r--r--tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp4
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp5
-rw-r--r--tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp2
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp3
-rw-r--r--tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp4
-rw-r--r--tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp3
-rw-r--r--tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp6
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp2
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp10
-rw-r--r--tests/auto/widgets/widgets/qdial/tst_qdial.cpp4
-rw-r--r--tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp3
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp6
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp2
-rw-r--r--tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp3
-rw-r--r--tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp4
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp4
-rw-r--r--tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp2
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp5
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp3
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp4
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp6
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp3
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp3
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp2
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp4
-rw-r--r--tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp2
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp4
-rw-r--r--tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp2
-rw-r--r--tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp2
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp3
-rw-r--r--tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp2
-rw-r--r--tests/auto/widgets/widgets/qslider/tst_qslider.cpp2
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp12
-rw-r--r--tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp2
-rw-r--r--tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp2
-rw-r--r--tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp2
-rw-r--r--tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp5
-rw-r--r--tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp16
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp3
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp4
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp4
-rw-r--r--tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp4
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp4
103 files changed, 207 insertions, 137 deletions
diff --git a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
index c329ca9f3e..b3aeaa81f8 100644
--- a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
+++ b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtGui/QtGui>
#include <QtWidgets/QColorDialog>
diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
index cc613b8218..9ef64480d6 100644
--- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
+++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
@@ -28,7 +28,8 @@
#include "../../../shared/highdpi.h"
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QTestEventLoop>
#include <qdialog.h>
#include <qapplication.h>
diff --git a/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp b/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
index 49ecc7305d..711bb6fe35 100644
--- a/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
+++ b/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
@@ -25,7 +25,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QErrorMessage>
#include <QDebug>
#include <QCheckBox>
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index e070f74ae5..2fe9f9b00d 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -27,7 +27,10 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QStandardPaths>
+#include <QSignalSpy>
+#include <QTemporaryFile>
#include <qcoreapplication.h>
#include <qfile.h>
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index efcf8719ca..a52ff0ee85 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -27,7 +27,10 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QTemporaryFile>
+#include <QSignalSpy>
+#include <QStandardPaths>
#include <qcoreapplication.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
index ad6bf900fd..6032acf00c 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
+++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qapplication.h>
diff --git a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
index 2a40af320b..db44597401 100644
--- a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
+++ b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
@@ -27,13 +27,15 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QString>
#include <QSpinBox>
#include <QPushButton>
#include <QLineEdit>
#include <QComboBox>
#include <QDialogButtonBox>
+#include <QTimer>
+
#include <qinputdialog.h>
#include <QtWidgets/private/qdialog_p.h>
diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
index 1d379acc46..ce84459973 100644
--- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
@@ -25,7 +25,9 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QtTest/QtTest>
+
+
+#include <QTest>
#include <QMessageBox>
#include <QDebug>
#include <QPair>
@@ -35,6 +37,8 @@
#include <QApplication>
#include <QPushButton>
#include <QDialogButtonBox>
+#include <QSignalSpy>
+
#include <qpa/qplatformtheme.h>
#include <private/qguiapplication_p.h>
diff --git a/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp b/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp
index 2149ee7c44..b847315abd 100644
--- a/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp
+++ b/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qapplication.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
index 20866a0fa7..5847bcd694 100644
--- a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
+++ b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
+
#include <QtWidgets/private/qsidebar_p.h>
#include <QtGui/private/qfilesystemmodel_p.h>
#include <QtWidgets/qfileiconprovider.h>
diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
index b8d2a4617c..8f655490e1 100644
--- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
+++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
@@ -28,7 +28,7 @@
#include <QFont>
-#include <QtTest/QtTest>
+#include <QTest>
#include <QCheckBox>
#include <QLabel>
#include <QLineEdit>
@@ -39,6 +39,8 @@
#include <QWizard>
#include <QTreeWidget>
#include <QScreen>
+#include <QSignalSpy>
+#include <QOperatingSystemVersion>
Q_DECLARE_METATYPE(QWizard::WizardButton);
diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard_2.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard_2.cpp
index e090c0d851..1b8ef9ad0f 100644
--- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard_2.cpp
+++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard_2.cpp
@@ -35,7 +35,7 @@
#include <QWizard>
#include <QWizardPage>
-#include <QtTest/QtTest>
+#include <QTest>
class taskQTBUG_25691 : public QWizard
{
diff --git a/tests/auto/widgets/effects/qpixmapfilter/tst_qpixmapfilter.cpp b/tests/auto/widgets/effects/qpixmapfilter/tst_qpixmapfilter.cpp
index 5cc08617c6..10e6ec63e6 100644
--- a/tests/auto/widgets/effects/qpixmapfilter/tst_qpixmapfilter.cpp
+++ b/tests/auto/widgets/effects/qpixmapfilter/tst_qpixmapfilter.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qpixmap.h>
#include <private/qpixmapfilter_p.h>
#include <qpainter.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index f755b4eb76..92cffa0226 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtWidgets/qgraphicsanchorlayout.h>
#include <private/qgraphicsanchorlayout_p.h>
#include <QtWidgets/qgraphicswidget.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
index 840db1c364..9e0293d875 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
#include <QtGui>
-#include <QtTest/QtTest>
+#include <QTest>
#include <QTest>
#include <QMetaType>
#include <QtWidgets/qgraphicsanchorlayout.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
index 5df8b7c1ac..ba8a309674 100644
--- a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtWidgets/qgraphicseffect.h>
#include <QtWidgets/qgraphicsview.h>
#include <QtWidgets/qgraphicsscene.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index 986ef2a126..effd8a28c1 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qgraphicsgridlayout.h>
#include <qgraphicswidget.h>
#include <qgraphicsscene.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index ab89a94a10..81e95cc3df 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtTest/private/qtesthelpers_p.h>
#include <private/qgraphicsitem_p.h>
@@ -60,6 +60,8 @@
#include <float.h>
#include <QStyleHints>
#include <QPainterPath>
+#include <QSignalSpy>
+#include <QTimer>
using AbstractGraphicsShapeItemPtr = QSharedPointer<QAbstractGraphicsShapeItem>;
using GraphicsItems = QList<QGraphicsItem *>;
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp
index 0d8e5b4d54..46e834afdb 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qgraphicsitemanimation.h>
#include <QtCore/qtimeline.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
index 7143dec0a1..167f418c3d 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtGui>
#include <QtWidgets>
#include <math.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
index 2d8bf40ee5..7e0a8b6033 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qgraphicslayoutitem.h>
#include <float.h>
#include <limits.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index 4371347475..eef554ad87 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qgraphicslinearlayout.h>
#include <qgraphicsproxywidget.h>
#include <qgraphicswidget.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp b/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp
index 482ce7d244..58c965a7d0 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
+
#include <qgraphicsitem.h>
#include <qgraphicsscene.h>
#include <qgraphicssceneevent.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
index a8f5e396e8..22b81773b9 100644
--- a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qgraphicsscene.h>
#include <qgraphicsitem.h>
#include <qpainterpath.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp
index 9f0d47223b..90d69ca853 100644
--- a/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qgraphicsitem.h>
#include <qpainterpath.h>
#include <qpen.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 7cb441a925..e9ba24f4fc 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtGui>
#include <QtWidgets>
#include <private/qgraphicsproxywidget_p.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index 21f1bee537..bfb746ed95 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -40,7 +40,11 @@
#include <QtGui/QPainterPath>
#include <QtGui/QScreen>
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QTestEventLoop>
+#include <QRandomGenerator>
+#include <QSignalSpy>
+#include <QMimeData>
#include <QtCore/QDebug>
#include <QtCore/QLoggingCategory>
diff --git a/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
index 640e0418e5..9645b9a7fb 100644
--- a/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtGui/QPainterPath>
#include <QtWidgets/qgraphicsscene.h>
#include <private/qgraphicsscenebsptreeindex_p.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp
index d23ccedc6f..5d5323a3a2 100644
--- a/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qgraphicsitem.h>
#include <qgraphicstransform.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 41d29e9b7b..e666ac24c9 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
+#include <QTimer>
#include <qgraphicsitem.h>
#include <qgraphicsscene.h>
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp
index 5c9134a3b0..72b5acc654 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp
@@ -25,7 +25,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtCore/QSize>
#include <QtCore/QRectF>
#include <QtGui/QTransform>
diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
index f31b82b2bb..c22195fada 100644
--- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qgraphicswidget.h>
#include <qgraphicsscene.h>
#include <qgraphicssceneevent.h>
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
index 7493daa432..25212373a4 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
@@ -28,7 +28,11 @@
#include "../../../shared/highdpi.h"
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QTimeZone>
+#include <QTimer>
+#include <QTestEventLoop>
+#include <QSignalSpy>
#include <qabstractitemview.h>
#include <qstandarditemmodel.h>
diff --git a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
index b4c259a1ef..63d49e1216 100644
--- a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
+++ b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
@@ -28,7 +28,8 @@
#include <QDialog>
#include <QMainWindow>
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
#include <qapplication.h>
#include <qevent.h>
diff --git a/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp b/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
index 539ff9c67f..7462fd8bbf 100644
--- a/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
+++ b/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qmainwindow.h>
#include <qmenu.h>
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 6763d3b6a6..46ccc0c662 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -31,7 +31,12 @@
#include <qdebug.h>
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QTimer>
+#include <QLibraryInfo>
+#include <QSignalSpy>
+#include <QFileSystemWatcher>
+#include <QSharedMemory>
#include <QtCore/QAbstractEventDispatcher>
#include <QtCore/QFileInfo>
diff --git a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
index c63a3c6a52..a410a7bf00 100644
--- a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
+++ b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtGui>
#include <QtWidgets>
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index d718a6c7d7..4aa9f8ac2d 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qlayout.h>
#include <qapplication.h>
#include <qwidget.h>
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index 411ca7120e..e3bd1d1553 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qlayout.h>
#include <qapplication.h>
#include <qwidget.h>
diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
index dec332196b..2a497df084 100644
--- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
+++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qcoreapplication.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
index 3abec08f09..6832f7a05a 100644
--- a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
+++ b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
@@ -27,7 +27,11 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QStringList>
+#include <QStringListModel>
+#include <QSignalSpy>
+
#include <qapplication.h>
#include <qtextedit.h>
#include <qlineedit.h>
diff --git a/tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp b/tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp
index d307d9f9a8..d6a5ec218d 100644
--- a/tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp
+++ b/tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qsizepolicy.h>
Q_DECLARE_METATYPE(Qt::Orientations)
diff --git a/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp b/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp
index 8721a7191a..711ffeda03 100644
--- a/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp
+++ b/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp
@@ -27,13 +27,14 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QLineEdit>
#include <QLabel>
#include <QStackedLayout>
#include <qapplication.h>
#include <qwidget.h>
#include <QPushButton>
+#include <QSignalSpy>
class tst_QStackedLayout : public QObject
{
diff --git a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
index 1b492d9a0f..092adc58af 100644
--- a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
+++ b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QTimer>
+
#include <qfont.h>
#include <qfontmetrics.h>
#include <qtooltip.h>
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
index 1b4584f95b..654d8e58ba 100644
--- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtGui/QtGui>
#include <QtCore/QTextStream>
#include <QtCore/QStringList>
diff --git a/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp b/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp
index ad91cf3031..384c07258b 100644
--- a/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp
+++ b/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp
@@ -27,7 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QTimer>
#include <qapplication.h>
#include <qtoolbar.h>
diff --git a/tests/auto/widgets/kernel/qwidgetmetatype/tst_qwidgetmetatype.cpp b/tests/auto/widgets/kernel/qwidgetmetatype/tst_qwidgetmetatype.cpp
index 1a6eb435a7..425380a99e 100644
--- a/tests/auto/widgets/kernel/qwidgetmetatype/tst_qwidgetmetatype.cpp
+++ b/tests/auto/widgets/kernel/qwidgetmetatype/tst_qwidgetmetatype.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qwidget.h>
#include <qlabel.h>
diff --git a/tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp b/tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp
index 364d7fc8c7..d33f734af0 100644
--- a/tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp
+++ b/tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qvariant.h>
diff --git a/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp b/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp
index ec646ccbe3..9dead3d3ea 100644
--- a/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp
+++ b/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qapplication.h>
#include <qwindow.h>
diff --git a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
index 16fe57f330..e9802cd716 100644
--- a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
+++ b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtWidgets>
#include <private/qstylehelper_p.h>
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index b7b9ab6423..0578d5ce70 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qlayout.h>
#include "qstyle.h"
#include <qevent.h>
diff --git a/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp b/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
index 0bf7b73906..a08b251c35 100644
--- a/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
+++ b/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QStyleOption>
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index a751fae05d..3c33354cfe 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -54,7 +54,7 @@
#include <QtGui/QPainter>
#include <QtGui/QScreen>
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtCore/QDebug>
#include <QtCore/QMetaObject>
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
index 5b7ba0dbb8..7de37875b2 100644
--- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
@@ -26,13 +26,14 @@
**
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtGui>
#include <QtWidgets>
#include <QtDebug>
#include <QPair>
#include <QList>
#include <QPointer>
+#include <QSignalSpy>
#include <QtTest/private/qtesthelpers_p.h>
diff --git a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
index 7272e53dc9..232b8084cd 100644
--- a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
+++ b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
@@ -28,7 +28,7 @@
#include <QtGui>
#include <QtWidgets>
-#include <QtTest>
+#include <QTest>
#include <QtGui/private/qevent_p.h>
#include <qpa/qwindowsysteminterface.h>
diff --git a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
index aa246fa04a..7511ea1f7c 100644
--- a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
+++ b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QTimer>
+#include <QSignalSpy>
#include <qguiapplication.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
index 26198c9aff..878647f4a4 100644
--- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
+++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
@@ -27,9 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
-
+#include <QTest>
+#include <QSignalSpy>
#include <qapplication.h>
#include <qpainter.h>
diff --git a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
index 86a5ebc114..de57769793 100644
--- a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
+++ b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qcoreapplication.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index 065834059e..7ab609a7ca 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QAbstractSlider>
#include <QScrollBar>
#include <QSlider>
@@ -35,6 +35,7 @@
#include <QStyleOption>
#include <QElapsedTimer>
#include <QDebug>
+#include <QSignalSpy>
#include <QtTest/private/qtesthelpers_p.h>
diff --git a/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp b/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
index 6fb13ed55e..6898cf18dc 100644
--- a/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
+++ b/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtTest/private/qtesthelpers_p.h>
#include <qcoreapplication.h>
diff --git a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
index e3448fa93d..8ab2faab43 100644
--- a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
+++ b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
@@ -27,8 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
+#include <QTest>
+#include <QSignalSpy>
#include "qbuttongroup.h"
#include <qaction.h>
diff --git a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
index ccaf593497..91da5dc69b 100644
--- a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
+++ b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
@@ -27,7 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
#include <qcalendarwidget.h>
#include <qtoolbutton.h>
diff --git a/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp b/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
index 0199262f4d..710b345658 100644
--- a/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
+++ b/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
@@ -29,6 +29,12 @@
#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
+
+#include <qapplication.h>
+#include <qpixmap.h>
+#include <qdatetime.h>
#include <qcheckbox.h>
class tst_QCheckBox : public QObject
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index e22a900676..909b0b4aaa 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -26,7 +26,9 @@
**
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
+#include <QSortFilterProxyModel>
#include "qcombobox.h"
#include <private/qcombobox_p.h>
diff --git a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
index d9e3f3ba42..0d9e3a3198 100644
--- a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
+++ b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include "qcommandlinkbutton.h"
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index 05124d1ad6..f9572b85e3 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -26,20 +26,16 @@
**
****************************************************************************/
-
-#include <QtTest/QtTest>
#include <qapplication.h>
#include <qgroupbox.h>
#include <qlineedit.h>
-
-
-
#include <qdatetimeedit.h>
#include <qlocale.h>
#include <qlayout.h>
#include <qeventloop.h>
#include <qstyle.h>
-#include <qstyle.h>
+
+#include <QTest>
#include <QStyleOptionSpinBox>
#include <QDate>
#include <QDateTime>
@@ -71,6 +67,8 @@
#include <QTestEventList>
#include <QDateEdit>
#include <QProxyStyle>
+#include <QTimeZone>
+#include <QScopeGuard>
#include <private/qdatetimeedit_p.h>
diff --git a/tests/auto/widgets/widgets/qdial/tst_qdial.cpp b/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
index 356f773ae9..29aee1c397 100644
--- a/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
+++ b/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
@@ -27,8 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
+#include <QTest>
+#include <QSignalSpy>
#include <QDial>
class tst_QDial : public QObject
diff --git a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
index f53988908a..2e7e248db7 100644
--- a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
+++ b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
@@ -25,7 +25,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QStyle>
#include <QtWidgets/QLayout>
diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
index 84a4f9e5a0..4aa8e9887e 100644
--- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
@@ -26,10 +26,8 @@
**
****************************************************************************/
-
-
-#include <QtTest/QtTest>
-
+#include <QTest>
+#include <QSignalSpy>
#include <qaction.h>
#include <qdockwidget.h>
diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
index 0ff3406ec4..6b0c353e3b 100644
--- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
+
#include <qapplication.h>
#include <limits.h>
diff --git a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
index 563f3c6e7b..d273d77e35 100644
--- a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
+++ b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qcoreapplication.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
index 0d95102f66..3b5a9387ab 100644
--- a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
+++ b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
+
#include <qfontcombobox.h>
class tst_QFontComboBox : public QObject
diff --git a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
index d9cd5ad136..b9def66f7c 100644
--- a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
+++ b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
@@ -27,13 +27,14 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QLineEdit>
#include <QStyle>
#include <QStyleOptionGroupBox>
#include <QVBoxLayout>
#include <QRadioButton>
#include <QDialog>
+#include <QSignalSpy>
#include "qgroupbox.h"
diff --git a/tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp b/tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp
index 191031c485..1a0532ffa4 100644
--- a/tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp
+++ b/tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp
@@ -27,8 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
+#include <QTest>
+#include <QSignalSpy>
#include <QKeySequenceEdit>
#include <QLineEdit>
#include <QString>
diff --git a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
index d4bc816ec0..ea72c91b0a 100644
--- a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
+++ b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
@@ -27,8 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
+#include <QTest>
+#include <QTimer>
#include "qlabel.h"
#include <qapplication.h>
diff --git a/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp b/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
index 9dcfd813ac..a97a090ebd 100644
--- a/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
+++ b/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qcoreapplication.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index a18999d174..3f1024a326 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtTest/private/qtesthelpers_p.h>
#include "qlineedit.h"
#include "qapplication.h"
@@ -43,6 +43,9 @@
#include "qstylehints.h"
#include <private/qapplication_p.h>
#include "qclipboard.h"
+#include <QSignalSpy>
+#include <QRandomGenerator>
+#include <QTimer>
#include <qlineedit.h>
#include <private/qlineedit_p.h>
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
index 75721bf7a7..b31acb2b7a 100644
--- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
@@ -27,7 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
#include <QtWidgets/qtwidgetsglobal.h>
#if QT_CONFIG(dockwidget)
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index 4914caf788..6df7c74bdc 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -27,8 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
+#include <QTest>
+#include <QSignalSpy>
#include <QMdiSubWindow>
#include <QMdiArea>
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
index 8121a3637f..a4283de59e 100644
--- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -26,13 +26,11 @@
**
****************************************************************************/
-
-#include <QtTest/QtTest>
-
#include "qmdisubwindow.h"
#include "private/qmdisubwindow_p.h"
#include "qmdiarea.h"
+#include <QTest>
#include <QLayout>
#include <QLineEdit>
#include <QMainWindow>
@@ -48,7 +46,7 @@
#include <QPushButton>
#include <QScreen>
#include <QSizeGrip>
-
+#include <QSignalSpy>
#include <QList>
QT_BEGIN_NAMESPACE
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
index e0f3381b8d..fb2280e508 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QtTest/private/qtesthelpers_p.h>
#include <qapplication.h>
#include <private/qguiapplication_p.h>
@@ -40,6 +40,7 @@
#include <QWidgetAction>
#include <QScreen>
#include <QSpinBox>
+#include <QSignalSpy>
#include <qdialog.h>
#include <qmenu.h>
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index 7719a798a3..0e6689b413 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -27,7 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
#include <qapplication.h>
#include <qmainwindow.h>
#include <qmenubar.h>
diff --git a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
index 8e21bb7042..3d7bb36f24 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
+++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
@@ -37,7 +37,7 @@
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QStackedWidget>
-#include <QtTest/QtTest>
+#include <QTest>
#include <QSignalSpy>
#include <private/qguiapplication_p.h>
#include <private/qstatictext_p.h>
diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
index 831612b910..0cffe14ee4 100644
--- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
+++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
@@ -27,8 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
+#include <QTest>
+#include <QSignalSpy>
#include <qtextedit.h>
#include <qtextcursor.h>
diff --git a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
index eb80460311..5c08ac4e3e 100644
--- a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
+++ b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include "qprogressbar.h"
#include <qlocale.h>
#include <qapplication.h>
diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
index 5b80ec4e2f..f8464e2383 100644
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
@@ -27,8 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
+#include <QTest>
+#include <QSignalSpy>
#include "qpushbutton.h"
#include <qapplication.h>
diff --git a/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp b/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
index 5c7d3bf1e9..8b1670ae06 100644
--- a/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
+++ b/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QRadioButton>
diff --git a/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp b/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
index 668d301205..8a9200f406 100644
--- a/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
+++ b/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qcoreapplication.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
index a40ce538b2..a08e51cafd 100644
--- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
@@ -27,11 +27,12 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QScrollBar>
#include <QStyleOptionSlider>
#include <QScrollArea>
#include <QScreen>
+#include <QSignalSpy>
#include <QtTest/private/qtesthelpers_p.h>
diff --git a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
index e4a8552365..1c69a1c8bd 100644
--- a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
+++ b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QSizeGrip>
#include <QEvent>
#include <QLineEdit>
diff --git a/tests/auto/widgets/widgets/qslider/tst_qslider.cpp b/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
index 65cc3c9ece..3722025782 100644
--- a/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
+++ b/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qcoreapplication.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index aa2025f439..724eff608f 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
@@ -26,16 +26,15 @@
**
****************************************************************************/
-
-#include <QtTest/QtTest>
#include <qdebug.h>
#include <qapplication.h>
#include <limits.h>
-
#include <qspinbox.h>
#include <qlocale.h>
#include <qlineedit.h>
#include <qlayout.h>
+
+#include <QTest>
#include <QSpinBox>
#include <QWidget>
#include <QString>
@@ -47,9 +46,7 @@
#include <QLocale>
#include <QDoubleSpinBox>
#include <QVBoxLayout>
-#if QT_CONFIG(shortcut)
-# include <QKeySequence>
-#endif
+#include <QSignalSpy>
#include <QStackedWidget>
#include <QDebug>
#include <QStyleOptionSpinBox>
@@ -57,6 +54,9 @@
#include <QProxyStyle>
#include <QScreen>
+#if QT_CONFIG(shortcut)
+# include <QKeySequence>
+#endif
class SpinBox : public QSpinBox
{
diff --git a/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp b/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp
index 64e4582366..c038682788 100644
--- a/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp
+++ b/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <QSplashScreen>
class tst_QSplashScreen : public QObject
diff --git a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
index 36cb15fa1f..ce7ac0a186 100644
--- a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qapplication.h>
#include <qsplitter.h>
#include <qstyle.h>
diff --git a/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp b/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
index 479c8a463d..df3b943e05 100644
--- a/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
+++ b/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qcoreapplication.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
index 30fff4e0be..d7079197ce 100644
--- a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
+++ b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
@@ -27,9 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
-
+#include <QTest>
+#include <QSignalSpy>
#include <qstatusbar.h>
#include <QLabel>
#include <QMainWindow>
diff --git a/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp b/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
index d61b48a41c..9d6d4b599c 100644
--- a/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
@@ -26,14 +26,14 @@
**
****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <qapplication.h>
-#include <qtabbar.h>
-
-#include <qpushbutton.h>
-#include <qstyle.h>
-#include <qstyleoption.h>
+#include <QTest>
+#include <QSignalSpy>
+#include <QApplication>
+#include <QTabBar>
+#include <QPushButton>
+#include <QStyle>
+#include <QStyleOptionTab>
+#include <QTimer>
class TabBar;
diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
index 4bbd44283d..0e7012482d 100644
--- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
@@ -27,7 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
#include <qtabwidget.h>
#include <qtabbar.h>
#include <qdebug.h>
diff --git a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
index 6995c09119..73266d77f3 100644
--- a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
+++ b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
+
#include <qtextbrowser.h>
#include <qapplication.h>
#include <qscrollbar.h>
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index b0e78892b2..8d5716c129 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QSignalSpy>
+#include <QTimer>
#include <qtextedit.h>
#include <qtextcursor.h>
diff --git a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
index 1d5ac7c819..8fea0dcd67 100644
--- a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
+++ b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
@@ -27,8 +27,8 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
+#include <QTest>
+#include <QSignalSpy>
#include <qabstractbutton.h>
#include <qaction.h>
diff --git a/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp b/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
index 8637b2e8f9..fc7eade9f4 100644
--- a/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
+++ b/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
#include <qtoolbox.h>
diff --git a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
index 9c3b1066a7..d6142dfcdc 100644
--- a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
+++ b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
-#include <QtTest/QtTest>
+#include <QTest>
+#include <QTimer>
+#include <QSignalSpy>
#include <qcoreapplication.h>
#include <qdebug.h>