diff options
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index baecc43f2c..a7aa99d2a8 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -72,6 +72,9 @@ #endif #include <QtTest/QTest> +#include <QtTest/private/qtesthelpers_p.h> + +using namespace QTestPrivate; #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) # include <QtCore/qt_windows.h> @@ -108,22 +111,6 @@ bool macHasAccessToWindowsServer() } #endif -// 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); -} - -static inline void centerOnScreen(QWidget *w) -{ - const QPoint offset = QPoint(w->width() / 2, w->height() / 2); - w->move(QGuiApplication::primaryScreen()->availableGeometry().center() - offset); -} - #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) static inline void setWindowsAnimationsEnabled(bool enabled) { |