diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-09-28 10:49:57 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-10-21 21:48:26 +0000 |
commit | 686c44a69b13f6e884dd2b6d9991f4cd94597c5a (patch) | |
tree | fbf54691477474ef9c918636c34619a78188872b /tests/auto/widgets/kernel/qaction/tst_qaction.cpp | |
parent | f773ddd026a6227cdb754dea4a5fe0a25137033f (diff) |
Diffstat (limited to 'tests/auto/widgets/kernel/qaction/tst_qaction.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qaction/tst_qaction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp index 71b55d71ea..b496550f85 100644 --- a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp +++ b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp @@ -329,7 +329,7 @@ void tst_QAction::enabledVisibleInteraction() void tst_QAction::task200823_tooltip() { - QAction *action = new QAction("foo", 0); + const QScopedPointer<QAction> action(new QAction("foo", Q_NULLPTR)); QString shortcut("ctrl+o"); action->setShortcut(shortcut); @@ -343,8 +343,8 @@ void tst_QAction::task200823_tooltip() void tst_QAction::task229128TriggeredSignalWithoutActiongroup() { // test without a group - QAction *actionWithoutGroup = new QAction("Test", qApp); - QSignalSpy spyWithoutGroup(actionWithoutGroup, SIGNAL(triggered(bool))); + const QScopedPointer<QAction> actionWithoutGroup(new QAction("Test", Q_NULLPTR)); + QSignalSpy spyWithoutGroup(actionWithoutGroup.data(), SIGNAL(triggered(bool))); QCOMPARE(spyWithoutGroup.count(), 0); actionWithoutGroup->trigger(); // signal should be emitted |