summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/testlib/qtestcase.cpp40
-rw-r--r--src/testlib/qtestcase.h28
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp3
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp2
-rw-r--r--tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp1
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp1
-rw-r--r--tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp2
-rw-r--r--tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp3
-rw-r--r--tests/auto/gestures/tst_gestures.cpp1
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp2
-rw-r--r--tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp1
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp2
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp1
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp1
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp1
-rw-r--r--tests/auto/qabstractitemview/tst_qabstractitemview.cpp1
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp1
-rw-r--r--tests/auto/qbuttongroup/tst_qbuttongroup.cpp2
-rw-r--r--tests/auto/qcolordialog/tst_qcolordialog.cpp2
-rw-r--r--tests/auto/qcolumnview/tst_qcolumnview.cpp1
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp1
-rw-r--r--tests/auto/qcompleter/tst_qcompleter.cpp1
-rw-r--r--tests/auto/qdialog/tst_qdialog.cpp2
-rw-r--r--tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp2
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp1
-rw-r--r--tests/auto/qfiledialog2/tst_qfiledialog2.cpp1
-rw-r--r--tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp1
-rw-r--r--tests/auto/qfocusevent/tst_qfocusevent.cpp2
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp1
-rw-r--r--tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp2
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp2
-rw-r--r--tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp2
-rw-r--r--tests/auto/qgraphicsobject/tst_qgraphicsobject.cpp1
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp1
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp1
-rw-r--r--tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp2
-rw-r--r--tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp1
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp1
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp1
-rw-r--r--tests/auto/qgridlayout/tst_qgridlayout.cpp1
-rw-r--r--tests/auto/qgroupbox/tst_qgroupbox.cpp2
-rw-r--r--tests/auto/qidentityproxymodel/tst_qidentityproxymodel.cpp2
-rw-r--r--tests/auto/qinputcontext/tst_qinputcontext.cpp2
-rw-r--r--tests/auto/qitemdelegate/tst_qitemdelegate.cpp2
-rw-r--r--tests/auto/qlabel/tst_qlabel.cpp2
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp2
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp2
-rw-r--r--tests/auto/qmdiarea/tst_qmdiarea.cpp1
-rw-r--r--tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp3
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp2
-rw-r--r--tests/auto/qmenubar/tst_qmenubar.cpp2
-rw-r--r--tests/auto/qmessagebox/tst_qmessagebox.cpp2
-rw-r--r--tests/auto/qprogressbar/tst_qprogressbar.cpp2
-rw-r--r--tests/auto/qpushbutton/tst_qpushbutton.cpp2
-rw-r--r--tests/auto/qscreen/tst_qscreen.cpp2
-rw-r--r--tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp2
-rw-r--r--tests/auto/qspinbox/tst_qspinbox.cpp1
-rw-r--r--tests/auto/qsplitter/tst_qsplitter.cpp1
-rw-r--r--tests/auto/qstackedlayout/tst_qstackedlayout.cpp2
-rw-r--r--tests/auto/qstatusbar/tst_qstatusbar.cpp2
-rw-r--r--tests/auto/qtabbar/tst_qtabbar.cpp1
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp1
-rw-r--r--tests/auto/qtablewidget/tst_qtablewidget.cpp1
-rw-r--r--tests/auto/qtextbrowser/tst_qtextbrowser.cpp2
-rw-r--r--tests/auto/qtoolbar/tst_qtoolbar.cpp2
-rw-r--r--tests/auto/qtooltip/tst_qtooltip.cpp1
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp4
-rw-r--r--tests/auto/qtreewidget/tst_qtreewidget.cpp3
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp2
-rw-r--r--tests/auto/qwidget_window/tst_qwidget_window.cpp3
-rw-r--r--tests/auto/qwidgetaction/tst_qwidgetaction.cpp2
-rw-r--r--tests/auto/qwindow/tst_qwindow.cpp2
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp1
-rw-r--r--tests/shared/util.h70
74 files changed, 66 insertions, 190 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index c579e0f11f..451fa5b761 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -109,7 +109,7 @@ QT_BEGIN_NAMESPACE
Example:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 0
- \sa QCOMPARE()
+ \sa QCOMPARE(), QTRY_VERIFY()
*/
/*! \macro QVERIFY2(condition, message)
@@ -159,7 +159,43 @@ QT_BEGIN_NAMESPACE
Example:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 2
- \sa QVERIFY(), QTest::toString()
+ \sa QVERIFY(), QTRY_COMPARE(), QTest::toString()
+*/
+
+/*! \macro QTRY_VERIFY(condition)
+
+ \relates QTest
+
+ The QTRY_VERIFY() macro is similar to QVERIFY(), but checks the \a condition
+ repeatedly, until either the condition becomes true or a maximum timeout is
+ reached. Between each evaluation, events will be processed. If the timeout
+ is reached, a failure is recorded in the test log and the test won't be
+ executed further.
+
+ The timeout is fixed at five seconds.
+
+ \note This macro can only be used in a test function that is invoked
+ by the test framework.
+
+ \sa QVERIFY(), QCOMPARE(), QTRY_COMPARE()
+*/
+
+/*! \macro QTRY_COMPARE(actual, expected)
+
+ \relates QTest
+
+ The QTRY_COMPARE() macro is similar to QCOMPARE(), but performs the comparison
+ of the \a actual and \a expected values repeatedly, until either the two values
+ are equal or a maximum timeout is reached. Between each comparison, events
+ will be processed. If the timeout is reached, a failure is recorded in the
+ test log and the test won't be executed further.
+
+ The timeout is fixed at five seconds.
+
+ \note This macro can only be used in a test function that is invoked
+ by the test framework.
+
+ \sa QCOMPARE(), QVERIFY(), QTRY_VERIFY()
*/
/*! \macro QFETCH(type, name)
diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h
index b3ac5f0c4f..642be0bc96 100644
--- a/src/testlib/qtestcase.h
+++ b/src/testlib/qtestcase.h
@@ -82,6 +82,34 @@ do {\
return;\
} while (0)
+// Will try to wait for the expression to become true while allowing event processing
+#define QTRY_VERIFY(__expr) \
+do { \
+ const int __step = 50; \
+ const int __timeout = 5000; \
+ if (!(__expr)) { \
+ QTest::qWait(0); \
+ } \
+ for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \
+ QTest::qWait(__step); \
+ } \
+ QVERIFY(__expr); \
+} while (0)
+
+// Will try to wait for the comparison to become successful while allowing event processing
+#define QTRY_COMPARE(__expr, __expected) \
+do { \
+ const int __step = 50; \
+ const int __timeout = 5000; \
+ if ((__expr) != (__expected)) { \
+ QTest::qWait(0); \
+ } \
+ for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
+ QTest::qWait(__step); \
+ } \
+ QCOMPARE(__expr, __expected); \
+} while (0)
+
#define QSKIP(statement, mode) \
do {\
QTest::qSkip(statement, QTest::mode, __FILE__, __LINE__);\
diff --git a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
index e5feab4aa6..519eab08c0 100644
--- a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -40,12 +40,9 @@
****************************************************************************/
#include <QtTest/QtTest>
-#include "../../../../shared/util.h"
-
#include <QtCore/qpropertyanimation.h>
#include <QtCore/qvariantanimation.h>
#include <QtWidgets/qwidget.h>
-#include "../../../../shared/util.h"
//TESTED_CLASS=QPropertyAnimation
//TESTED_FILES=
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
index 00c038b948..42438a6827 100644
--- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
@@ -40,8 +40,6 @@
****************************************************************************/
#include <QtTest/QtTest>
-#include "../../../../shared/util.h"
-
#include <QtCore/qanimationgroup.h>
#include <QtCore/qsequentialanimationgroup.h>
diff --git a/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp b/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
index 615a4c507f..c7e35e2b75 100644
--- a/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
+++ b/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
@@ -46,7 +46,6 @@
#include <qfuturewatcher.h>
#include <qtconcurrentrun.h>
#include <qtconcurrentmap.h>
-#include "../../../../shared/util.h"
#include <private/qfutureinterface_p.h>
using namespace QtConcurrent;
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index 571f633c4b..5d3e268d96 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -51,7 +51,6 @@
#include <QtCore/QtDebug>
#include <QtCore/QString>
#include <QtGui/QKeySequence>
-#include "../../../../shared/util.h"
#include <cctype>
#if defined(Q_OS_WIN) && defined(Q_CC_GNU)
diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
index 2e1f914497..83c67d695c 100644
--- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
@@ -54,8 +54,6 @@
#include <QTcpServer>
#include <QTcpSocket>
-#include "../../../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
index d069cf162e..4af2a492d7 100644
--- a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
+++ b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
@@ -50,9 +50,6 @@
#include <unistd.h>
#endif
-#include "../../../../shared/util.h"
-
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp
index e86a9f7fad..63345fbe88 100644
--- a/tests/auto/gestures/tst_gestures.cpp
+++ b/tests/auto/gestures/tst_gestures.cpp
@@ -42,7 +42,6 @@
#include <QtTest/QtTest>
#include <QtTest/qtesttouch.h>
-#include "../../shared/util.h"
#include <qevent.h>
#include <qwidget.h>
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 17a3982213..70674aa29a 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -41,8 +41,6 @@
#include <QtTest/QtTest>
-#include "../../../../shared/util.h"
-
#include <qpainter.h>
#include <qdrawutil.h>
#include <qapplication.h>
diff --git a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
index 1491d64c58..d507c93cf5 100644
--- a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
+++ b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
@@ -42,7 +42,6 @@
#include <QtTest/QtTest>
#include <QtNetwork/QtNetwork>
-#include "../../../../shared/util.h"
#include "../../../network-settings.h"
#ifndef QT_NO_BEARERMANAGEMENT
diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index 030eae60a0..750721beab 100644
--- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -43,8 +43,6 @@
#include <QtTest/QtTest>
#include <QtNetwork/QtNetwork>
#include <qnetworkdiskcache.h>
-#include "../../../../shared/util.h"
-
#define EXAMPLE_URL "http://user:pass@www.example.com/#foo"
//cached objects are organized into these many subdirs
#define NUM_SUBDIRECTORIES 16
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index 49de1716cd..3e0437f3c8 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -95,7 +95,6 @@
#endif
#include "../../../network-settings.h"
-#include "../../../../shared/util.h"
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
index 131fc71ff5..a9d3bebd08 100644
--- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
@@ -45,7 +45,6 @@
#include <qtextstream.h>
#include <QtNetwork/qlocalsocket.h>
#include <QtNetwork/qlocalserver.h>
-#include "../../../../shared/util.h"
//TESTED_CLASS=QLocalServer, QLocalSocket
//TESTED_FILES=network/socket/qlocalserver.cpp network/socket/qlocalsocket.cpp
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index 6106960917..95ab719405 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -93,7 +93,6 @@
#include "private/qhostinfo_p.h"
#include "../../../network-settings.h"
-#include "../../../../shared/util.h"
Q_DECLARE_METATYPE(QAbstractSocket::SocketError)
Q_DECLARE_METATYPE(QAbstractSocket::SocketState)
diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
index 2c87198c9e..b9c652f1d3 100644
--- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
@@ -58,7 +58,6 @@
#include <qscrollbar.h>
#include <qboxlayout.h>
#include <qlineedit.h>
-#include "../../shared/util.h"
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index 7d6650608c..9e24c87e19 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -41,7 +41,6 @@
#include <QtTest/QtTest>
-#include "../../shared/util.h"
#include <QtGui>
#include <QtWidgets>
#include <math.h>
diff --git a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
index 87173ae72c..f9f6ec0a54 100644
--- a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
+++ b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
@@ -57,8 +57,6 @@
#include <qsettings.h>
#endif
-#include "../../shared/util.h"
-
class SpecialRadioButton: public QRadioButton
{
public:
diff --git a/tests/auto/qcolordialog/tst_qcolordialog.cpp b/tests/auto/qcolordialog/tst_qcolordialog.cpp
index 98430fe6c7..3ae1e63a8e 100644
--- a/tests/auto/qcolordialog/tst_qcolordialog.cpp
+++ b/tests/auto/qcolordialog/tst_qcolordialog.cpp
@@ -44,8 +44,6 @@
#include <QtGui/QtGui>
#include <QtWidgets/QColorDialog>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qcolumnview/tst_qcolumnview.cpp b/tests/auto/qcolumnview/tst_qcolumnview.cpp
index 8d820eaefa..364f917511 100644
--- a/tests/auto/qcolumnview/tst_qcolumnview.cpp
+++ b/tests/auto/qcolumnview/tst_qcolumnview.cpp
@@ -52,7 +52,6 @@
#include <qitemdelegate.h>
#include <qscrollbar.h>
#include <private/qcolumnview_p.h>
-#include "../../shared/util.h"
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index 042240164a..cb4468f6f4 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -76,7 +76,6 @@
#include <qcleanlooksstyle.h>
#endif
#include <qabstractitemview.h>
-#include "../../shared/util.h"
#include <qstyleditemdelegate.h>
#ifndef QT_NO_STYLE_WINDOWS
#include <qwindowsstyle.h>
diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp
index a9725c4192..b0720b8776 100644
--- a/tests/auto/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/qcompleter/tst_qcompleter.cpp
@@ -47,7 +47,6 @@
#include <QList>
#include <QPointer>
-#include "../../shared/util.h"
#include "../../shared/filesystem.h"
//TESTED_CLASS=
diff --git a/tests/auto/qdialog/tst_qdialog.cpp b/tests/auto/qdialog/tst_qdialog.cpp
index 5672ce5e68..0f4acdcc9e 100644
--- a/tests/auto/qdialog/tst_qdialog.cpp
+++ b/tests/auto/qdialog/tst_qdialog.cpp
@@ -50,8 +50,6 @@
#include <QVBoxLayout>
#include <QSizeGrip>
-#include "../../shared/util.h"
-
Q_DECLARE_METATYPE(QSize)
diff --git a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
index 967787715b..15f38e3334 100644
--- a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -53,8 +53,6 @@
#include <qlineedit.h>
#include <qdebug.h>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=gui/widgets/qspinbox.h gui/widgets/qspinbox.cpp gui/widgets/qabstractspinbox.cpp gui/widgets/qabstractspinbox_p.h gui/widgets/qabstractspinbox.h
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp
index f76f4c922e..2a14ecbc28 100644
--- a/tests/auto/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp
@@ -60,7 +60,6 @@
#include <qsortfilterproxymodel.h>
#include <qlineedit.h>
#include <qlayout.h>
-#include "../../shared/util.h"
#if defined QT_BUILD_INTERNAL
#include "../../../src/widgets/dialogs/qsidebar_p.h"
#include "../../../src/widgets/dialogs/qfilesystemmodel_p.h"
diff --git a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
index 0edc028ce6..dad1e903f9 100644
--- a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
@@ -60,7 +60,6 @@
#include <qsortfilterproxymodel.h>
#include <qlineedit.h>
#include <qlayout.h>
-#include "../../shared/util.h"
#include "../../../src/widgets/dialogs/qsidebar_p.h"
#include "../../../src/widgets/dialogs/qfilesystemmodel_p.h"
#include "../../../src/widgets/dialogs/qfiledialog_p.h"
diff --git a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 5e353d5735..26fa58e649 100644
--- a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -48,7 +48,6 @@
#include <QFileIconProvider>
#include <QTreeView>
#include <QHeaderView>
-#include "../../shared/util.h"
#include <QTime>
#include <QStyle>
#include <QtGlobal>
diff --git a/tests/auto/qfocusevent/tst_qfocusevent.cpp b/tests/auto/qfocusevent/tst_qfocusevent.cpp
index 9a1d312c9f..931059b211 100644
--- a/tests/auto/qfocusevent/tst_qfocusevent.cpp
+++ b/tests/auto/qfocusevent/tst_qfocusevent.cpp
@@ -50,8 +50,6 @@
#include <qlineedit.h>
#include <QBoxLayout>
-#include "../../shared/util.h"
-
QT_FORWARD_DECLARE_CLASS(QWidget)
//TESTED_CLASS=
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index f69b66534a..e72dd45667 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -49,7 +49,6 @@
#include <QtWidgets/qgraphicswidget.h>
#include <QtWidgets/qstyleoption.h>
-#include "../../shared/util.h"
#include <private/qgraphicseffect_p.h>
#include "../platformquirks.h"
diff --git a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
index a5dcf738e7..4f39f991c6 100644
--- a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
+++ b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
@@ -48,8 +48,6 @@
#include <private/qgraphicseffect_p.h>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index a9ba80b1f5..64824b2048 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -67,8 +67,6 @@
#include <QGraphicsLinearLayout>
#include <float.h>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp
index 4f618c27a6..3eac04e4e5 100644
--- a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp
+++ b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp
@@ -45,8 +45,6 @@
#include <QtWidgets>
#include <math.h>
-#include "../../shared/util.h"
-
//TESTED_CLASS=QGraphicsLayout
//TESTED_FILES=
diff --git a/tests/auto/qgraphicsobject/tst_qgraphicsobject.cpp b/tests/auto/qgraphicsobject/tst_qgraphicsobject.cpp
index f77d38f1ab..85e36b74b2 100644
--- a/tests/auto/qgraphicsobject/tst_qgraphicsobject.cpp
+++ b/tests/auto/qgraphicsobject/tst_qgraphicsobject.cpp
@@ -47,7 +47,6 @@
#include <qgraphicsview.h>
#include <qstyleoption.h>
#include <private/qobject_p.h>
-#include "../../shared/util.h"
class tst_QGraphicsObject : public QObject {
Q_OBJECT
diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 8dcb4ebf68..78c545e25a 100644
--- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -43,7 +43,6 @@
#include <QtTest/QtTest>
#include <QtGui>
#include <QtWidgets>
-#include "../../shared/util.h"
#include <private/qgraphicsproxywidget_p.h>
#include <private/qlayoutengine_p.h> // qSmartMin functions...
#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 809837dbfd..0a34573039 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -50,7 +50,6 @@
#include <private/qgraphicsscene_p.h>
#include <private/qgraphicssceneindex_p.h>
#include <math.h>
-#include "../../shared/util.h"
#include "../gui/painting/qpathclipper/pathcompare.h"
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
diff --git a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
index 61a107da05..7507701267 100644
--- a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
+++ b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
@@ -45,8 +45,6 @@
#include <private/qgraphicsscenebsptreeindex_p.h>
#include <private/qgraphicssceneindex_p.h>
#include <private/qgraphicsscenelinearindex_p.h>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
index 1a116b7f30..7d5a9578ad 100644
--- a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
+++ b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
@@ -43,7 +43,6 @@
#include <QtTest/QtTest>
#include <qgraphicsitem.h>
#include <qgraphicstransform.h>
-#include "../../shared/util.h"
class tst_QGraphicsTransform : public QObject {
Q_OBJECT
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index 0a0dfc216f..444e15a788 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -71,7 +71,6 @@
#include <QtWidgets/QInputContext>
#include <QtWidgets/QDesktopWidget>
#include <private/qgraphicsview_p.h>
-#include "../../shared/util.h"
#include "../platformquirks.h"
//TESTED_CLASS=
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index feae6f7372..e3eb05ca1a 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -52,7 +52,6 @@
#include <qboxlayout.h>
#include <qaction.h>
#include <qwidgetaction.h>
-#include "../../shared/util.h"
#include "../platformquirks.h"
diff --git a/tests/auto/qgridlayout/tst_qgridlayout.cpp b/tests/auto/qgridlayout/tst_qgridlayout.cpp
index 486522bc90..3b352644f3 100644
--- a/tests/auto/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/qgridlayout/tst_qgridlayout.cpp
@@ -54,7 +54,6 @@
#include <QtWidgets/QWindowsStyle>
#include <QStyleFactory>
-#include "../../shared/util.h"
#include "../platformquirks.h"
//TESTED_CLASS=
diff --git a/tests/auto/qgroupbox/tst_qgroupbox.cpp b/tests/auto/qgroupbox/tst_qgroupbox.cpp
index f1388bc2b6..8568ef01d1 100644
--- a/tests/auto/qgroupbox/tst_qgroupbox.cpp
+++ b/tests/auto/qgroupbox/tst_qgroupbox.cpp
@@ -49,8 +49,6 @@
#include "qgroupbox.h"
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qidentityproxymodel/tst_qidentityproxymodel.cpp b/tests/auto/qidentityproxymodel/tst_qidentityproxymodel.cpp
index ae36d9e5d7..6d73cbe2e1 100644
--- a/tests/auto/qidentityproxymodel/tst_qidentityproxymodel.cpp
+++ b/tests/auto/qidentityproxymodel/tst_qidentityproxymodel.cpp
@@ -41,8 +41,6 @@
#include <QtTest/QtTest>
-#include "../../shared/util.h"
-
#include <QtCore>
#include <QtGui>
#include <QtWidgets>
diff --git a/tests/auto/qinputcontext/tst_qinputcontext.cpp b/tests/auto/qinputcontext/tst_qinputcontext.cpp
index 942160edac..9b6452851e 100644
--- a/tests/auto/qinputcontext/tst_qinputcontext.cpp
+++ b/tests/auto/qinputcontext/tst_qinputcontext.cpp
@@ -40,8 +40,6 @@
****************************************************************************/
#include <QtTest/QtTest>
-#include "../../shared/util.h"
-
#include <qinputcontext.h>
#include <qlineedit.h>
#include <qplaintextedit.h>
diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
index 2a9b45dd55..e419a7f097 100644
--- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
@@ -63,8 +63,6 @@
#include <QPlainTextEdit>
#include <QDialog>
-#include "../../shared/util.h"
-
Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint)
//TESTED_CLASS=
diff --git a/tests/auto/qlabel/tst_qlabel.cpp b/tests/auto/qlabel/tst_qlabel.cpp
index 495eb94c1f..8f689d2454 100644
--- a/tests/auto/qlabel/tst_qlabel.cpp
+++ b/tests/auto/qlabel/tst_qlabel.cpp
@@ -56,8 +56,6 @@
//TESTED_CLASS=
//TESTED_FILES=
-#include "../../shared/util.h"
-
class Widget : public QWidget
{
public:
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index 5cae5b8aee..6081b504de 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -41,8 +41,6 @@
#include <QtTest/QtTest>
-#include "../../shared/util.h"
-
#include "qlineedit.h"
#include "qapplication.h"
#include "qstringlist.h"
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index 152a12f923..b58a306f94 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -60,8 +60,6 @@
# include <QtGui/QPlatformNativeInterface>
#endif // Q_OS_WIN
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qmdiarea/tst_qmdiarea.cpp b/tests/auto/qmdiarea/tst_qmdiarea.cpp
index c75236224b..bbc3d27e27 100644
--- a/tests/auto/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/qmdiarea/tst_qmdiarea.cpp
@@ -62,7 +62,6 @@
#endif
#include <QMacStyle>
-#include "../../shared/util.h"
#include "../platformquirks.h"
static const Qt::WindowFlags DefaultWindowFlags
diff --git a/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp
index 93b81ec033..f7593336e1 100644
--- a/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -63,9 +63,6 @@
#include <QMacStyle>
#endif
-#include "../../shared/util.h"
-
-
QT_BEGIN_NAMESPACE
#if defined(Q_WS_X11)
extern void qt_x11_wait_for_window_manager(QWidget *w);
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index d3eb5f260a..41c24a9992 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -56,8 +56,6 @@
#include <qstyle.h>
#include <qdebug.h>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qmenubar/tst_qmenubar.cpp b/tests/auto/qmenubar/tst_qmenubar.cpp
index 7ccb225941..dc3b81920d 100644
--- a/tests/auto/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/qmenubar/tst_qmenubar.cpp
@@ -56,8 +56,6 @@
#include <qobject.h>
-#include "../../shared/util.h"
-
QT_FORWARD_DECLARE_CLASS(QMainWindow)
#include <qmenubar.h>
diff --git a/tests/auto/qmessagebox/tst_qmessagebox.cpp b/tests/auto/qmessagebox/tst_qmessagebox.cpp
index ac33efc564..a07d7cf7a9 100644
--- a/tests/auto/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/qmessagebox/tst_qmessagebox.cpp
@@ -55,8 +55,6 @@
#include <QCleanlooksStyle>
#endif
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qprogressbar/tst_qprogressbar.cpp b/tests/auto/qprogressbar/tst_qprogressbar.cpp
index 04b7ce744e..55285b42ff 100644
--- a/tests/auto/qprogressbar/tst_qprogressbar.cpp
+++ b/tests/auto/qprogressbar/tst_qprogressbar.cpp
@@ -48,8 +48,6 @@
#include <qtimer.h>
#include <QStyleFactory>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qpushbutton/tst_qpushbutton.cpp b/tests/auto/qpushbutton/tst_qpushbutton.cpp
index 7742f6b567..fffe1c26e4 100644
--- a/tests/auto/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/qpushbutton/tst_qpushbutton.cpp
@@ -54,8 +54,6 @@
#include <QStyleFactory>
#include <QTabWidget>
-#include "../../shared/util.h"
-
Q_DECLARE_METATYPE(QPushButton*)
//TESTED_CLASS=
diff --git a/tests/auto/qscreen/tst_qscreen.cpp b/tests/auto/qscreen/tst_qscreen.cpp
index 98ca031116..1d00032b56 100644
--- a/tests/auto/qscreen/tst_qscreen.cpp
+++ b/tests/auto/qscreen/tst_qscreen.cpp
@@ -43,8 +43,6 @@
#include <QtTest/QtTest>
-#include "../../shared/util.h"
-
class tst_QScreen: public QObject
{
Q_OBJECT
diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index b8a9b6252b..96f7249e3c 100644
--- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -41,8 +41,6 @@
#include <QtTest/QtTest>
-#include "../../shared/util.h"
-
#include "dynamictreemodel.h"
#include "modeltest.h"
diff --git a/tests/auto/qspinbox/tst_qspinbox.cpp b/tests/auto/qspinbox/tst_qspinbox.cpp
index a142e2dfe9..608dcd6705 100644
--- a/tests/auto/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/qspinbox/tst_qspinbox.cpp
@@ -67,7 +67,6 @@
#include <QKeySequence>
#include <QStackedWidget>
#include <QDebug>
-#include "../../shared/util.h"
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qsplitter/tst_qsplitter.cpp b/tests/auto/qsplitter/tst_qsplitter.cpp
index 08d757e5c1..a5967e836d 100644
--- a/tests/auto/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/qsplitter/tst_qsplitter.cpp
@@ -55,7 +55,6 @@
#include <qtreeview.h>
#include <qlabel.h>
#include <qdebug.h> // for file error messages
-#include "../../shared/util.h"
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qstackedlayout/tst_qstackedlayout.cpp b/tests/auto/qstackedlayout/tst_qstackedlayout.cpp
index dc28bcd09f..de734877d7 100644
--- a/tests/auto/qstackedlayout/tst_qstackedlayout.cpp
+++ b/tests/auto/qstackedlayout/tst_qstackedlayout.cpp
@@ -47,8 +47,6 @@
#include <qwidget.h>
#include <QPushButton>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=gui/kernel/qlayout.cpp gui/kernel/qlayout.h
diff --git a/tests/auto/qstatusbar/tst_qstatusbar.cpp b/tests/auto/qstatusbar/tst_qstatusbar.cpp
index a8df61dd4b..a4a232951a 100644
--- a/tests/auto/qstatusbar/tst_qstatusbar.cpp
+++ b/tests/auto/qstatusbar/tst_qstatusbar.cpp
@@ -48,8 +48,6 @@
#include <QMainWindow>
#include <QSizeGrip>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qtabbar/tst_qtabbar.cpp b/tests/auto/qtabbar/tst_qtabbar.cpp
index 79b0bda0ed..a1a8f3b0aa 100644
--- a/tests/auto/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/qtabbar/tst_qtabbar.cpp
@@ -46,7 +46,6 @@
#include <qpushbutton.h>
#include <qstyle.h>
-#include "../../shared/util.h"
class tst_QTabBar : public QObject
{
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index 1130ae7d02..2242490a44 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -44,7 +44,6 @@
#include <QtWidgets/QtWidgets>
#include <private/qtablewidget_p.h>
#include <QtTest/QtTest>
-#include "../../shared/util.h"
#include "private/qapplication_p.h"
//TESTED_CLASS=
diff --git a/tests/auto/qtablewidget/tst_qtablewidget.cpp b/tests/auto/qtablewidget/tst_qtablewidget.cpp
index 0b66f4df33..6c32caadbb 100644
--- a/tests/auto/qtablewidget/tst_qtablewidget.cpp
+++ b/tests/auto/qtablewidget/tst_qtablewidget.cpp
@@ -41,7 +41,6 @@
#include <QtTest/QtTest>
-#include "../../shared/util.h"
#include <qeventloop.h>
#include <qlist.h>
#include <qpair.h>
diff --git a/tests/auto/qtextbrowser/tst_qtextbrowser.cpp b/tests/auto/qtextbrowser/tst_qtextbrowser.cpp
index 659105b14c..a1592e5e2b 100644
--- a/tests/auto/qtextbrowser/tst_qtextbrowser.cpp
+++ b/tests/auto/qtextbrowser/tst_qtextbrowser.cpp
@@ -49,8 +49,6 @@
#include <qtextbrowser.h>
#include <qtextobject.h>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qtoolbar/tst_qtoolbar.cpp b/tests/auto/qtoolbar/tst_qtoolbar.cpp
index 5eac3f0915..d15e753b2d 100644
--- a/tests/auto/qtoolbar/tst_qtoolbar.cpp
+++ b/tests/auto/qtoolbar/tst_qtoolbar.cpp
@@ -57,8 +57,6 @@
#include <qmenu.h>
#include <private/qtoolbarextension_p.h>
-#include "../../shared/util.h"
-
//TESTED_FILES=
QT_FORWARD_DECLARE_CLASS(QAction)
diff --git a/tests/auto/qtooltip/tst_qtooltip.cpp b/tests/auto/qtooltip/tst_qtooltip.cpp
index d663bf4d45..3ff31ead62 100644
--- a/tests/auto/qtooltip/tst_qtooltip.cpp
+++ b/tests/auto/qtooltip/tst_qtooltip.cpp
@@ -42,7 +42,6 @@
#include <QtTest/QtTest>
#include <qtooltip.h>
-#include "../../shared/util.h"
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp
index e80837fd0e..d6cdf00218 100644
--- a/tests/auto/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/qtreeview/tst_qtreeview.cpp
@@ -39,14 +39,10 @@
**
****************************************************************************/
-
-
#include <qabstractitemview.h>
-
#include <QtTest/QtTest>
#include <QtGui/QtGui>
#include <QtWidgets/QtWidgets>
-#include "../../shared/util.h"
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qtreewidget/tst_qtreewidget.cpp b/tests/auto/qtreewidget/tst_qtreewidget.cpp
index dc878c4818..5e1faf97c4 100644
--- a/tests/auto/qtreewidget/tst_qtreewidget.cpp
+++ b/tests/auto/qtreewidget/tst_qtreewidget.cpp
@@ -51,9 +51,6 @@
#include <QScrollBar>
#include <QStyledItemDelegate>
-#include "../../shared/util.h"
-
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 3629bf14b0..ded0c5e061 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -73,8 +73,6 @@
#include <QtWidgets/QGraphicsView>
#include <QtWidgets/QGraphicsProxyWidget>
-#include "../../shared/util.h"
-
#ifdef Q_WS_QWS
# include <qscreen_qws.h>
#endif
diff --git a/tests/auto/qwidget_window/tst_qwidget_window.cpp b/tests/auto/qwidget_window/tst_qwidget_window.cpp
index 60ae6c3334..eb8b555bd6 100644
--- a/tests/auto/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/qwidget_window/tst_qwidget_window.cpp
@@ -52,9 +52,6 @@
#include <QX11Info>
#endif // Q_WS_X11
-#include "../../shared/util.h"
-
-
class tst_QWidget_window : public QWidget
{
Q_OBJECT
diff --git a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
index 46b7e38fa0..5f51f6d316 100644
--- a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
+++ b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
@@ -51,8 +51,6 @@
#include <qmainwindow.h>
#include <qmenubar.h>
-#include "../../shared/util.h"
-
//TESTED_CLASS=
//TESTED_FILES=
diff --git a/tests/auto/qwindow/tst_qwindow.cpp b/tests/auto/qwindow/tst_qwindow.cpp
index 478bcbe78c..4171f0f797 100644
--- a/tests/auto/qwindow/tst_qwindow.cpp
+++ b/tests/auto/qwindow/tst_qwindow.cpp
@@ -43,8 +43,6 @@
#include <QtTest/QtTest>
-#include "../../shared/util.h"
-
class tst_QWindow: public QObject
{
Q_OBJECT
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
index b60adfcdfd..ecb6419a97 100644
--- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
+++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
@@ -46,7 +46,6 @@
#include <QWindowsStyle>
#include <QDesktopWidget>
#include <QX11Info>
-#include "../../shared/util.h"
#if QT_VERSION < 0x050000
#include <private/qwindowsurface_p.h>
diff --git a/tests/shared/util.h b/tests/shared/util.h
deleted file mode 100644
index ac78f2dfec..0000000000
--- a/tests/shared/util.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-// Functions and macros that really need to be in QTestLib
-
-// Will try to wait for the condition while allowing event processing
-#define QTRY_VERIFY(__expr) \
- do { \
- const int __step = 50; \
- const int __timeout = 5000; \
- if (!(__expr)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QVERIFY(__expr); \
- } while(0)
-
-// Will try to wait for the condition while allowing event processing
-#define QTRY_COMPARE(__expr, __expected) \
- do { \
- const int __step = 50; \
- const int __timeout = 5000; \
- if ((__expr) != (__expected)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QCOMPARE(__expr, __expected); \
- } while(0)
-