diff options
author | Liang Qi <liang.qi@qt.io> | 2018-08-16 13:34:53 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-08-16 18:48:59 +0200 |
commit | 8559bf934def636ccff487464adb600d219f8778 (patch) | |
tree | 3063152f487798c7103dbf61216e48c37586a4e1 /tests/auto/other/qfocusevent/tst_qfocusevent.cpp | |
parent | f1a6b97fe2d3eda9455b13bb79828f250d46b92e (diff) | |
parent | a0ebd98f58b2d92c34fafbc620f024caa36bf0ad (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/corelib/global/qconfig-bootstrapped.h
src/plugins/platforms/xcb/qxcbbackingstore.cpp
Done-with: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: I4af138ffb2f5306373244523768209e8873b2798
Diffstat (limited to 'tests/auto/other/qfocusevent/tst_qfocusevent.cpp')
-rw-r--r-- | tests/auto/other/qfocusevent/tst_qfocusevent.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp index 1b02c9e8ab..260ba12a97 100644 --- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp +++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp @@ -38,6 +38,9 @@ #include <QBoxLayout> #include <QSysInfo> +#include <qpa/qplatformintegration.h> +#include <private/qguiapplication_p.h> + QT_FORWARD_DECLARE_CLASS(QWidget) class FocusLineEdit : public QLineEdit @@ -92,13 +95,16 @@ private slots: void checkReason_ActiveWindow(); private: - QWidget* testFocusWidget; + QWidget* testFocusWidget = nullptr; FocusLineEdit* childFocusWidgetOne; FocusLineEdit* childFocusWidgetTwo; }; void tst_QFocusEvent::initTestCase() { + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation)) + QSKIP("QWindow::requestActivate() is not supported on this platform."); + testFocusWidget = new QWidget( 0 ); childFocusWidgetOne = new FocusLineEdit( testFocusWidget ); childFocusWidgetOne->setGeometry( 10, 10, 180, 20 ); |