Skip all qfocusevent test on platforms that don't support window activation
Task-number: QTBUG-66846 Change-Id: Ia8b69ede9154822f78ca28e0a2470b8bfb2abef0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>bb10
parent
833b9997fd
commit
edbac71691
|
|
@ -1,4 +1,4 @@
|
|||
CONFIG += testcase
|
||||
TARGET = tst_qfocusevent
|
||||
QT += widgets testlib
|
||||
QT += widgets testlib gui-private
|
||||
SOURCES += 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 );
|
||||
|
|
|
|||
Loading…
Reference in New Issue