Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/globalshortcuts_test.cpp
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | |||||
71 | void GlobalShortcutsTest::cleanup() | 71 | void GlobalShortcutsTest::cleanup() | ||
72 | { | 72 | { | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | void GlobalShortcutsTest::testConsumedShift() | 75 | void GlobalShortcutsTest::testConsumedShift() | ||
76 | { | 76 | { | ||
77 | // this test verifies that a shortcut with a consumed shift modifier triggers | 77 | // this test verifies that a shortcut with a consumed shift modifier triggers | ||
78 | // create the action | 78 | // create the action | ||
79 | QScopedPointer<QAction> action(new QAction); | 79 | QScopedPointer<QAction> action(new QAction(nullptr)); | ||
graesslin: this doesn't make sense. Can you try whether:
```
new QAction()
```
or
```
new QAction… | |||||
80 | action->setProperty("componentName", QStringLiteral(KWIN_NAME)); | 80 | action->setProperty("componentName", QStringLiteral(KWIN_NAME)); | ||
81 | action->setObjectName(QStringLiteral("globalshortcuts-test-consumed-shift")); | 81 | action->setObjectName(QStringLiteral("globalshortcuts-test-consumed-shift")); | ||
82 | QSignalSpy triggeredSpy(action.data(), &QAction::triggered); | 82 | QSignalSpy triggeredSpy(action.data(), &QAction::triggered); | ||
83 | QVERIFY(triggeredSpy.isValid()); | 83 | QVERIFY(triggeredSpy.isValid()); | ||
84 | KGlobalAccel::self()->setShortcut(action.data(), QList<QKeySequence>{Qt::Key_Percent}, KGlobalAccel::NoAutoloading); | 84 | KGlobalAccel::self()->setShortcut(action.data(), QList<QKeySequence>{Qt::Key_Percent}, KGlobalAccel::NoAutoloading); | ||
85 | input()->registerShortcut(Qt::Key_Percent, action.data()); | 85 | input()->registerShortcut(Qt::Key_Percent, action.data()); | ||
86 | 86 | | |||
87 | // press shift+5 | 87 | // press shift+5 | ||
Show All 13 Lines |
this doesn't make sense. Can you try whether:
or
works? I don't like parenting for something in a scoped pointer