summaryrefslogtreecommitdiffstats
path: root/tests/auto/qshortcut/tst_qshortcut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qshortcut/tst_qshortcut.cpp')
-rw-r--r--tests/auto/qshortcut/tst_qshortcut.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qshortcut/tst_qshortcut.cpp b/tests/auto/qshortcut/tst_qshortcut.cpp
index a78e8cf..d761b19 100644
--- a/tests/auto/qshortcut/tst_qshortcut.cpp
+++ b/tests/auto/qshortcut/tst_qshortcut.cpp
@@ -1124,7 +1124,8 @@ void tst_QShortcut::context()
// ------------------------------------------------------------------
void tst_QShortcut::clearAllShortcuts()
{
- qDeleteAll(shortcuts);
+ QList<QShortcut *> shortcutsCpy = shortcuts;
+ qDeleteAll(shortcutsCpy);
shortcuts.clear();
}