summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2017-10-30 13:45:18 +0100
committerGatis Paeglis <gatis.paeglis@qt.io>2017-11-04 20:11:22 +0000
commitad36da8ff416501e249beb098e5b84eaa2fba43d (patch)
tree48926e9edb976a5e804748a70ddb15d537e69e54 /tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
parent01f5f77c66dd6e4c15e0e0d8445e3560543e1973 (diff)
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 <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp')
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index c324a4bd56..1ccda25339 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -41,20 +41,16 @@
#include <QStyleFactory>
#include <QSharedPointer>
+#include <QtTest/private/qtesthelpers_p.h>
+
+using namespace QTestPrivate;
+
#include <qformlayout.h>
// ItemRole has enumerators for numerical values 0..2, thus the only
// valid numerical values for storing into an ItemRole variable are 0..3:
Q_CONSTEXPR QFormLayout::ItemRole invalidRole = QFormLayout::ItemRole(3);
-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);
-}
-
struct QFormLayoutTakeRowResultHolder {
QFormLayoutTakeRowResultHolder(QFormLayout::TakeRowResult result) Q_DECL_NOTHROW
: labelItem(result.labelItem),