From ad36da8ff416501e249beb098e5b84eaa2fba43d Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 30 Oct 2017 13:45:18 +0100 Subject: testlib: start sharing common helper functions ... by moving them in QTestPrivate namespace (qtesthelpers_p.h). This header file is a convenient staging area for helper APIs, eventually some could be moved to public QTest API. This header file utilizes the same pattern as other qtestlib header files - wrapping functions with QT_${LIBNAME}_LIB to automatically enable certain APIs based on what is in the projects dependencies, e.g. QT += widgets. Change-Id: Ic0266429939c1f3788912ad8b84fc6e0d5edd68b Reviewed-by: Edward Welbourne --- tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp') diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp index b9785c35ac..d8b8546d86 100644 --- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp +++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp @@ -46,6 +46,10 @@ #include #include +#include + +using namespace QTestPrivate; + #if defined(Q_OS_WIN) # include # include @@ -64,16 +68,6 @@ Q_DECLARE_METATYPE(QAbstractItemView::ScrollMode) Q_DECLARE_METATYPE(QMargins) Q_DECLARE_METATYPE(QSize) -// 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 QStringList generateList(const QString &prefix, int size) { QStringList result; -- cgit v1.2.3