diff options
Diffstat (limited to 'tests/auto/widgets/styles')
4 files changed, 7 insertions, 16 deletions
diff --git a/tests/auto/widgets/styles/qstyle/qstyle.pro b/tests/auto/widgets/styles/qstyle/qstyle.pro index a1e5a70a08..0fb7499946 100644 --- a/tests/auto/widgets/styles/qstyle/qstyle.pro +++ b/tests/auto/widgets/styles/qstyle/qstyle.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qstyle -QT += widgets testlib +QT += widgets testlib testlib-private SOURCES += tst_qstyle.cpp android { diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp index d5ef2fe94b..cd8ba95b06 100644 --- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp +++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp @@ -60,15 +60,9 @@ #include <algorithm> -// Make a widget frameless to prevent size constraints of title bars -// from interfering (Windows). -static inline void setFrameless(QWidget *w) -{ - Qt::WindowFlags flags = w->windowFlags(); - flags |= Qt::FramelessWindowHint; - flags &= ~(Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint); - w->setWindowFlags(flags); -} +#include <QtTest/private/qtesthelpers_p.h> + +using namespace QTestPrivate; class tst_QStyle : public QObject { diff --git a/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro b/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro index 7d9a8576d3..3bf1b94050 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro +++ b/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qstylesheetstyle -QT += widgets widgets-private gui-private testlib +QT += widgets widgets-private gui-private testlib testlib-private SOURCES += tst_qstylesheetstyle.cpp RESOURCES += resources.qrc diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index 693b0b8aee..7953077152 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -33,12 +33,9 @@ #include <QMetaObject> #include <private/qstylesheetstyle_p.h> +#include <QtTest/private/qtesthelpers_p.h> -static inline void centerOnScreen(QWidget *w) -{ - const QPoint offset = QPoint(w->width() / 2, w->height() / 2); - w->move(QGuiApplication::primaryScreen()->availableGeometry().center() - offset); -} +using namespace QTestPrivate; class tst_QStyleSheetStyle : public QObject { |