summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel/qaction/tst_qaction.cpp')
-rw-r--r--tests/auto/widgets/kernel/qaction/tst_qaction.cpp6
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