parent qaction in test

Summary:
My compiler doesn't seem to like this constructor, it bails out with the
following error:

/home/sebas/kf5/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp:
In member function ‘void GlobalShortcutsTest::testConsumedShift()’:
/home/sebas/kf5/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp:79:40:
error: no matching function for call to ‘QAction::QAction()’
     QScopedPointer<QAction> action(new QAction);
                                        ^~~~~~~

Using this as first argument fixes the build on my machine.

Test Plan: screenedges test fails, others pass. (this screenedges test failure seems unrelated)

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: luebking, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2782
This commit is contained in:
Sebastian Kügler 2016-09-15 13:59:25 +02:00 committed by Martin Gräßlin
parent 38a5933249
commit 99f491e799

View file

@ -76,7 +76,7 @@ void GlobalShortcutsTest::testConsumedShift()
{
// this test verifies that a shortcut with a consumed shift modifier triggers
// create the action
QScopedPointer<QAction> action(new QAction);
QScopedPointer<QAction> action(new QAction(nullptr));
action->setProperty("componentName", QStringLiteral(KWIN_NAME));
action->setObjectName(QStringLiteral("globalshortcuts-test-consumed-shift"));
QSignalSpy triggeredSpy(action.data(), &QAction::triggered);