tst_QGuiApplication check WindowActivate capability instead of platform
Task-number: QTBUG-66849 Change-Id: I31dfe6d38435b043eb21d2de02d44551649444c9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
f1d2c20a27
commit
d0349e17ac
@ -35,9 +35,12 @@
|
||||
#include <QtGui/QFont>
|
||||
#include <QtGui/QPalette>
|
||||
#include <QtGui/QStyleHints>
|
||||
#include <qpa/qplatformintegration.h>
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
#include <qgenericplugin.h>
|
||||
|
||||
#include <private/qguiapplication_p.h>
|
||||
|
||||
#if defined(Q_OS_QNX)
|
||||
#include <QOpenGLContext>
|
||||
#endif
|
||||
@ -203,8 +206,8 @@ void tst_QGuiApplication::focusObject()
|
||||
int argc = 0;
|
||||
QGuiApplication app(argc, 0);
|
||||
|
||||
if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
|
||||
QSKIP("Wayland: This fails. Figure out why.");
|
||||
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
|
||||
QSKIP("QWindow::requestActivate() is not supported.");
|
||||
|
||||
QObject obj1, obj2, obj3;
|
||||
const QRect screenGeometry = QGuiApplication::primaryScreen()->availableVirtualGeometry();
|
||||
@ -374,8 +377,8 @@ void tst_QGuiApplication::changeFocusWindow()
|
||||
int argc = 0;
|
||||
QGuiApplication app(argc, 0);
|
||||
|
||||
if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
|
||||
QSKIP("Wayland: This fails. Figure out why.");
|
||||
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
|
||||
QSKIP("QWindow::requestActivate() is not supported.");
|
||||
|
||||
const QRect screenGeometry = QGuiApplication::primaryScreen()->availableVirtualGeometry();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user