tests: skip tst_QShortcut::applicationShortcut() on Wayland
Task-number: QTBUG-120334 Change-Id: I0c71c6f474f1a0f31bc823579a54556a3e64bda2 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit d14a1ceffb87b6b62b6a79625be190d40ca9630d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
bfc841f149
commit
b70496888c
@ -16,4 +16,5 @@ qt_internal_add_test(tst_qshortcut_kernel
|
|||||||
tst_qshortcut.cpp
|
tst_qshortcut.cpp
|
||||||
LIBRARIES
|
LIBRARIES
|
||||||
Qt::Gui
|
Qt::Gui
|
||||||
|
Qt::GuiPrivate
|
||||||
)
|
)
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
#include <QtGui/qwindow.h>
|
#include <QtGui/qwindow.h>
|
||||||
#include <QtTest/qsignalspy.h>
|
#include <QtTest/qsignalspy.h>
|
||||||
|
|
||||||
|
#include <QtGui/private/qguiapplication_p.h>
|
||||||
|
#include <qpa/qplatformintegration.h>
|
||||||
|
|
||||||
class tst_QShortcut : public QObject
|
class tst_QShortcut : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -18,6 +21,9 @@ private slots:
|
|||||||
|
|
||||||
void tst_QShortcut::applicationShortcut()
|
void tst_QShortcut::applicationShortcut()
|
||||||
{
|
{
|
||||||
|
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
|
||||||
|
QSKIP("Window activation is not supported");
|
||||||
|
|
||||||
auto *shortcut = new QShortcut(Qt::CTRL | Qt::Key_A, this);
|
auto *shortcut = new QShortcut(Qt::CTRL | Qt::Key_A, this);
|
||||||
shortcut->setContext(Qt::ApplicationShortcut);
|
shortcut->setContext(Qt::ApplicationShortcut);
|
||||||
QSignalSpy activatedSpy(shortcut, &QShortcut::activated);
|
QSignalSpy activatedSpy(shortcut, &QShortcut::activated);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user