@@ -53,8 +53,8 @@ private Q_SLOTS:
5353 void initTestCase() {} // will be called before the first test function is executed
5454 void cleanupTestCase() {} // will be called after the last test function was executed.
5555
56− void init() {} // called right before each and every test function is executed
57− void cleanup() {} // called right after each and every test function is executed
56+ void init(); // called right before each and every test function is executed
57+ void cleanup(); // called right after each and every test function is executed
5858
5959 void requestWithNoCandidates();
6060 void lateCandidateRequestGetsNothing();
@@ -67,11 +67,23 @@ private Q_SLOTS:
6767 void rejectingTouchfterItsEnd();
6868 void removeOldUndecidedCandidates();
6969 void interimOwnerWontGetUnownedTouchEvents();
70+
71+private:
72+ TouchRegistry *touchRegistry;
7073};
7174
75+void tst_TouchRegistry::init()
76+{
77+ touchRegistry = TouchRegistry::instance();
78+}
79+
80+void tst_TouchRegistry::cleanup()
81+{
82+ delete touchRegistry;
83+}
84+
7285void tst_TouchRegistry::requestWithNoCandidates()
7386{
74− TouchRegistry touchRegistry;
7587 DummyCandidate candidate;
7688
7789 {
@@ -83,17 +95,16 @@ void tst_TouchRegistry::requestWithNoCandidates()
8395 Qt::NoModifier,
8496 Qt::TouchPointPressed,
8597 touchPoints);
86− touchRegistry.update(&touchEvent);
98+ touchRegistry->update(&touchEvent);
8799 }
88100
89− touchRegistry.requestTouchOwnership(0, &candidate);
101+ touchRegistry->requestTouchOwnership(0, &candidate);
90102
91103 QVERIFY(candidate.ownedTouches.contains(0));
92104}
93105
94106void tst_TouchRegistry::lateCandidateRequestGetsNothing()
95107{
96− TouchRegistry touchRegistry;
97108 DummyCandidate earlyCandidate;
98109 earlyCandidate.setObjectName("early");
99110 DummyCandidate lateCandidate;
@@ -108,21 +119,21 @@ void tst_TouchRegistry::lateCandidateRequestGetsNothing()
108119 Qt::NoModifier,
109120 Qt::TouchPointPressed,
110121 touchPoints);
111− touchRegistry.update(&touchEvent);
122+ touchRegistry->update(&touchEvent);
112123 }
113124
114− touchRegistry.addCandidateOwnerForTouch(0, &earlyCandidate);
115− touchRegistry.addCandidateOwnerForTouch(0, &lateCandidate);
125+ touchRegistry->addCandidateOwnerForTouch(0, &earlyCandidate);
126+ touchRegistry->addCandidateOwnerForTouch(0, &lateCandidate);
116127
117128 QVERIFY(earlyCandidate.ownedTouches.isEmpty());
118129 QVERIFY(lateCandidate.ownedTouches.isEmpty());
119130
120− touchRegistry.requestTouchOwnership(0, &lateCandidate);
131+ touchRegistry->requestTouchOwnership(0, &lateCandidate);
121132
122133 QVERIFY(earlyCandidate.ownedTouches.isEmpty());
123134 QVERIFY(lateCandidate.ownedTouches.isEmpty());
124135
125− touchRegistry.requestTouchOwnership(0, &earlyCandidate);
136+ touchRegistry->requestTouchOwnership(0, &earlyCandidate);
126137
127138 QVERIFY(earlyCandidate.ownedTouches.contains(0));
128139 QVERIFY(lateCandidate.ownedTouches.isEmpty());
@@ -130,7 +141,6 @@ void tst_TouchRegistry::lateCandidateRequestGetsNothing()
130141
131142void tst_TouchRegistry::lateCandidateGestOwnershipOnceEarlyCandidateQuits()
132143{
133− TouchRegistry touchRegistry;
134144 DummyCandidate earlyCandidate;
135145 DummyCandidate lateCandidate;
136146
@@ -143,21 +153,21 @@ void tst_TouchRegistry::lateCandidateGestOwnershipOnceEarlyCandidateQuits()
143153 Qt::NoModifier,
144154 Qt::TouchPointPressed,
145155 touchPoints);
146− touchRegistry.update(&touchEvent);
156+ touchRegistry->update(&touchEvent);
147157 }
148158
149− touchRegistry.addCandidateOwnerForTouch(0, &earlyCandidate);
150− touchRegistry.addCandidateOwnerForTouch(0, &lateCandidate);
159+ touchRegistry->addCandidateOwnerForTouch(0, &earlyCandidate);
160+ touchRegistry->addCandidateOwnerForTouch(0, &lateCandidate);
151161
152162 QVERIFY(earlyCandidate.ownedTouches.isEmpty());
153163 QVERIFY(lateCandidate.ownedTouches.isEmpty());
154164
155− touchRegistry.requestTouchOwnership(0, &lateCandidate);
165+ touchRegistry->requestTouchOwnership(0, &lateCandidate);
156166
157167 QVERIFY(earlyCandidate.ownedTouches.isEmpty());
158168 QVERIFY(lateCandidate.ownedTouches.isEmpty());
159169
160− touchRegistry.removeCandidateOwnerForTouch(0, &earlyCandidate);
170+ touchRegistry->removeCandidateOwnerForTouch(0, &earlyCandidate);
161171
162172 QVERIFY(earlyCandidate.ownedTouches.isEmpty());
163173 QVERIFY(lateCandidate.ownedTouches.contains(0));
@@ -165,7 +175,6 @@ void tst_TouchRegistry::lateCandidateGestOwnershipOnceEarlyCandidateQuits()
165175
166176void tst_TouchRegistry::dispatchesTouchEventsToCandidates()
167177{
168− TouchRegistry touchRegistry;
169178 QQuickItem rootItem;
170179
171180 DummyCandidate candidate0;
@@ -190,10 +199,10 @@ void tst_TouchRegistry::dispatchesTouchEventsToCandidates()
190199 Qt::NoModifier,
191200 Qt::TouchPointPressed,
192201 touchPoints);
193− touchRegistry.update(&touchEvent);
202+ touchRegistry->update(&touchEvent);
194203 }
195204
196− touchRegistry.addCandidateOwnerForTouch(0, &candidate0);
205+ touchRegistry->addCandidateOwnerForTouch(0, &candidate0);
197206
198207 {
199208 QList<QTouchEvent::TouchPoint> touchPoints;
@@ -208,7 +217,7 @@ void tst_TouchRegistry::dispatchesTouchEventsToCandidates()
208217 Qt::NoModifier,
209218 Qt::TouchPointPressed | Qt::TouchPointMoved,
210219 touchPoints);
211− touchRegistry.update(&touchEvent);
220+ touchRegistry->update(&touchEvent);
212221 }
213222
214223 // candidate0 should have received an update on the touch he's interested on.
@@ -220,7 +229,7 @@ void tst_TouchRegistry::dispatchesTouchEventsToCandidates()
220229 QCOMPARE(candidate0.unownedTouchEvents[0].touchPoints[0].rect().x(), 11 - candidate0.x());
221230 QCOMPARE(candidate0.unownedTouchEvents[0].touchPoints[0].rect().y(), 11 - candidate0.y());
222231
223− touchRegistry.addCandidateOwnerForTouch(1, &candidate1);
232+ touchRegistry->addCandidateOwnerForTouch(1, &candidate1);
224233
225234 {
226235 QList<QTouchEvent::TouchPoint> touchPoints;
@@ -235,7 +244,7 @@ void tst_TouchRegistry::dispatchesTouchEventsToCandidates()
235244 Qt::NoModifier,
236245 Qt::TouchPointPressed | Qt::TouchPointMoved,
237246 touchPoints);
238− touchRegistry.update(&touchEvent);
247+ touchRegistry->update(&touchEvent);
239248 }
240249
241250 // candidate0 gets updates only for touch 0 and
@@ -252,7 +261,6 @@ void tst_TouchRegistry::dispatchesTouchEventsToCandidates()
252261
253262void tst_TouchRegistry::dispatchesTouchEventsToWatchers()
254263{
255− TouchRegistry touchRegistry;
256264 QQuickItem rootItem;
257265
258266 DummyCandidate watcher;
@@ -271,10 +279,10 @@ void tst_TouchRegistry::dispatchesTouchEventsToWatchers()
271279 Qt::NoModifier,
272280 Qt::TouchPointPressed,
273281 touchPoints);
274− touchRegistry.update(&touchEvent);
282+ touchRegistry->update(&touchEvent);
275283 }
276284
277− touchRegistry.addTouchWatcher(0, &watcher);
285+ touchRegistry->addTouchWatcher(0, &watcher);
278286
279287 {
280288 QList<QTouchEvent::TouchPoint> touchPoints;
@@ -289,7 +297,7 @@ void tst_TouchRegistry::dispatchesTouchEventsToWatchers()
289297 Qt::NoModifier,
290298 Qt::TouchPointPressed | Qt::TouchPointMoved,
291299 touchPoints);
292− touchRegistry.update(&touchEvent);
300+ touchRegistry->update(&touchEvent);
293301 }
294302
295303 // watcher should have received an update on the touch he's interested on.
@@ -314,7 +322,7 @@ void tst_TouchRegistry::dispatchesTouchEventsToWatchers()
314322 Qt::NoModifier,
315323 Qt::TouchPointPressed | Qt::TouchPointMoved,
316324 touchPoints);
317− touchRegistry.update(&touchEvent);
325+ touchRegistry->update(&touchEvent);
318326 }
319327
320328 // watcher gets updates only for touch 0
@@ -326,7 +334,6 @@ void tst_TouchRegistry::dispatchesTouchEventsToWatchers()
326334
327335void tst_TouchRegistry::keepDispatchingToWatchersAfterLastCandidateGivesUp()
328336{
329− TouchRegistry touchRegistry;
330337 DummyCandidate item;
331338
332339 {
@@ -338,10 +345,10 @@ void tst_TouchRegistry::keepDispatchingToWatchersAfterLastCandidateGivesUp()
338345 Qt::NoModifier,
339346 Qt::TouchPointPressed,
340347 touchPoints);
341− touchRegistry.update(&touchEvent);
348+ touchRegistry->update(&touchEvent);
342349 }
343350
344− touchRegistry.addCandidateOwnerForTouch(0, &item);
351+ touchRegistry->addCandidateOwnerForTouch(0, &item);
345352
346353 {
347354 QList<QTouchEvent::TouchPoint> touchPoints;
@@ -354,7 +361,7 @@ void tst_TouchRegistry::keepDispatchingToWatchersAfterLastCandidateGivesUp()
354361 Qt::NoModifier,
355362 Qt::TouchPointPressed | Qt::TouchPointMoved,
356363 touchPoints);
357− touchRegistry.update(&touchEvent);
364+ touchRegistry->update(&touchEvent);
358365 }
359366
360367 QCOMPARE(item.unownedTouchEvents.count(), 1);
@@ -362,7 +369,7 @@ void tst_TouchRegistry::keepDispatchingToWatchersAfterLastCandidateGivesUp()
362369 QCOMPARE(item.unownedTouchEvents[0].touchPoints[0].id(), 0);
363370 item.unownedTouchEvents.clear();
364371
365− touchRegistry.addTouchWatcher(1, &item);
372+ touchRegistry->addTouchWatcher(1, &item);
366373
367374 {
368375 QList<QTouchEvent::TouchPoint> touchPoints;
@@ -375,7 +382,7 @@ void tst_TouchRegistry::keepDispatchingToWatchersAfterLastCandidateGivesUp()
375382 Qt::NoModifier,
376383 Qt::TouchPointMoved,
377384 touchPoints);
378− touchRegistry.update(&touchEvent);
385+ touchRegistry->update(&touchEvent);
379386 }
380387
381388 QCOMPARE(item.unownedTouchEvents.count(), 1);
@@ -395,7 +402,7 @@ void tst_TouchRegistry::keepDispatchingToWatchersAfterLastCandidateGivesUp()
395402 Qt::NoModifier,
396403 Qt::TouchPointReleased | Qt::TouchPointMoved,
397404 touchPoints);
398− touchRegistry.update(&touchEvent);
405+ touchRegistry->update(&touchEvent);
399406 }
400407
401408 QCOMPARE(item.unownedTouchEvents.count(), 1);
@@ -404,7 +411,7 @@ void tst_TouchRegistry::keepDispatchingToWatchersAfterLastCandidateGivesUp()
404411 QVERIFY(item.unownedTouchEvents[0].containsTouchWithId(1));
405412 item.unownedTouchEvents.clear();
406413
407− touchRegistry.removeCandidateOwnerForTouch(0, &item);
414+ touchRegistry->removeCandidateOwnerForTouch(0, &item);
408415
409416 {
410417 QList<QTouchEvent::TouchPoint> touchPoints;
@@ -415,7 +422,7 @@ void tst_TouchRegistry::keepDispatchingToWatchersAfterLastCandidateGivesUp()
415422 Qt::NoModifier,
416423 Qt::TouchPointReleased,
417424 touchPoints);
418− touchRegistry.update(&touchEvent);
425+ touchRegistry->update(&touchEvent);
419426 }
420427
421428 QCOMPARE(item.unownedTouchEvents.count(), 1);
@@ -423,7 +430,7 @@ void tst_TouchRegistry::keepDispatchingToWatchersAfterLastCandidateGivesUp()
423430 QVERIFY(item.unownedTouchEvents[0].containsTouchWithId(1));
424431 item.unownedTouchEvents.clear();
425432
426− QVERIFY(touchRegistry.m_touchInfoPool.isEmpty());
433+ QVERIFY(touchRegistry->m_touchInfoPool.isEmpty());
427434}
428435
429436/*
@@ -432,7 +439,6 @@ void tst_TouchRegistry::keepDispatchingToWatchersAfterLastCandidateGivesUp()
432439 */
433440void tst_TouchRegistry::candidatesAndWatchers_1()
434441{
435− TouchRegistry touchRegistry;
436442 DummyCandidate item;
437443
438444 {
@@ -444,10 +450,10 @@ void tst_TouchRegistry::candidatesAndWatchers_1()
444450 Qt::NoModifier,
445451 Qt::TouchPointPressed,
446452 touchPoints);
447− touchRegistry.update(&touchEvent);
453+ touchRegistry->update(&touchEvent);
448454 }
449455
450− touchRegistry.addCandidateOwnerForTouch(0, &item);
456+ touchRegistry->addCandidateOwnerForTouch(0, &item);
451457
452458 {
453459 QList<QTouchEvent::TouchPoint> touchPoints;
@@ -460,14 +466,14 @@ void tst_TouchRegistry::candidatesAndWatchers_1()
460466 Qt::NoModifier,
461467 Qt::TouchPointPressed | Qt::TouchPointMoved,
462468 touchPoints);
463− touchRegistry.update(&touchEvent);
469+ touchRegistry->update(&touchEvent);
464470 }
465471
466− touchRegistry.addTouchWatcher(1, &item);
472+ touchRegistry->addTouchWatcher(1, &item);
467473
468− touchRegistry.removeCandidateOwnerForTouch(0, &item);
474+ touchRegistry->removeCandidateOwnerForTouch(0, &item);
469475
470− touchRegistry.addTouchWatcher(0, &item);
476+ touchRegistry->addTouchWatcher(0, &item);
471477
472478 {
473479 QList<QTouchEvent::TouchPoint> touchPoints;
@@ -480,7 +486,7 @@ void tst_TouchRegistry::candidatesAndWatchers_1()
480486 Qt::NoModifier,
481487 Qt::TouchPointReleased | Qt::TouchPointMoved,
482488 touchPoints);
483− touchRegistry.update(&touchEvent);
489+ touchRegistry->update(&touchEvent);
484490 }
485491
486492 {
@@ -492,10 +498,10 @@ void tst_TouchRegistry::candidatesAndWatchers_1()
492498 Qt::NoModifier,
493499 Qt::TouchPointReleased,
494500 touchPoints);
495− touchRegistry.update(&touchEvent);
501+ touchRegistry->update(&touchEvent);
496502 }
497503
498− QVERIFY(touchRegistry.m_touchInfoPool.isEmpty());
504+ QVERIFY(touchRegistry->m_touchInfoPool.isEmpty());
499505
500506 item.unownedTouchEvents.clear();
501507
@@ -508,7 +514,7 @@ void tst_TouchRegistry::candidatesAndWatchers_1()
508514 Qt::NoModifier,
509515 Qt::TouchPointPressed,
510516 touchPoints);
511− touchRegistry.update(&touchEvent);
517+ touchRegistry->update(&touchEvent);
512518 }
513519
514520 // Haven't made any subscription for that new touch 0.
@@ -521,8 +527,6 @@ void tst_TouchRegistry::candidatesAndWatchers_1()
521527 */
522528void tst_TouchRegistry::candidatesAndWatchers_2()
523529{
524− TouchRegistry touchRegistry;
525−
526530 DummyCandidate directionalDragArea;
527531 directionalDragArea.setObjectName("DirectionalDragArea");
528532
@@ -539,14 +543,14 @@ void tst_TouchRegistry::candidatesAndWatchers_2()
539543 Qt::NoModifier,
540544 Qt::TouchPointPressed,
541545 touchPoints);
542− touchRegistry.update(&touchEvent);
546+ touchRegistry->update(&touchEvent);
543547 }
544548
545549 // [TouchRegistry] addCandidateOwnerForTouch id 0 candidate DirectionalDragArea
546− touchRegistry.addCandidateOwnerForTouch(0, &directionalDragArea);
550+ touchRegistry->addCandidateOwnerForTouch(0, &directionalDragArea);
547551
548552 // [TouchRegistry] requestTouchOwnership id 0 candidate TouchGate
549− touchRegistry.requestTouchOwnership(0, &touchGate);
553+ touchRegistry->requestTouchOwnership(0, &touchGate);
550554
551555 //[TouchRegistry] got TouchUpdate (id:0, state:moved, scenePos:(147,1023)) (id:1, state:pressed, scenePos:(327,792))
552556 {
@@ -560,24 +564,24 @@ void tst_TouchRegistry::candidatesAndWatchers_2()
560564 Qt::NoModifier,
561565 Qt::TouchPointPressed | Qt::TouchPointMoved,
562566 touchPoints);
563− touchRegistry.update(&touchEvent);
567+ touchRegistry->update(&touchEvent);
564568 }
565569
566570 // [TouchRegistry] addTouchWatcher id 1 watcher DirectionalDragArea
567− touchRegistry.addTouchWatcher(1, &directionalDragArea);
571+ touchRegistry->addTouchWatcher(1, &directionalDragArea);
568572
569573 // [TouchRegistry] removeCandidateOwnerForTouch id 0 candidate DirectionalDragArea
570− touchRegistry.removeCandidateOwnerForTouch(0, &directionalDragArea);
574+ touchRegistry->removeCandidateOwnerForTouch(0, &directionalDragArea);
571575
572576 //[TouchRegistry] sending TouchWonershipEvent(id = 0 gained) to candidate TouchGate
573577 QCOMPARE(touchGate.ownedTouches.count(), 1);
574578 QVERIFY(touchGate.ownedTouches.contains(0));
575579
576580 // [TouchRegistry] addTouchWatcher id 0 watcher DirectionalDragArea
577− touchRegistry.addTouchWatcher(0, &directionalDragArea);
581+ touchRegistry->addTouchWatcher(0, &directionalDragArea);
578582
579583 // [TouchRegistry] requestTouchOwnership id 1 candidate TouchGate
580− touchRegistry.requestTouchOwnership(1, &touchGate);
584+ touchRegistry->requestTouchOwnership(1, &touchGate);
581585
582586 //[TouchRegistry] sending TouchWonershipEvent(id = 1 gained) to candidate TouchGate
583587 QCOMPARE(touchGate.ownedTouches.count(), 2);
@@ -598,7 +602,7 @@ void tst_TouchRegistry::candidatesAndWatchers_2()
598602 Qt::NoModifier,
599603 Qt::TouchPointMoved,
600604 touchPoints);
601− touchRegistry.update(&touchEvent);
605+ touchRegistry->update(&touchEvent);
602606 }
603607
604608 //vvvvv DDA Watchers are being ignored from now on vvvvvvv
@@ -624,7 +628,7 @@ void tst_TouchRegistry::candidatesAndWatchers_2()
624628 Qt::NoModifier,
625629 Qt::TouchPointMoved | Qt::TouchPointReleased,
626630 touchPoints);
627− touchRegistry.update(&touchEvent);
631+ touchRegistry->update(&touchEvent);
628632 }
629633
630634 QCOMPARE(directionalDragArea.unownedTouchEvents.count(), 1);
@@ -646,7 +650,7 @@ void tst_TouchRegistry::candidatesAndWatchers_2()
646650 Qt::NoModifier,
647651 Qt::TouchPointReleased,
648652 touchPoints);
649− touchRegistry.update(&touchEvent);
653+ touchRegistry->update(&touchEvent);
650654 }
651655
652656 QCOMPARE(directionalDragArea.unownedTouchEvents.count(), 1);
@@ -658,7 +662,6 @@ void tst_TouchRegistry::candidatesAndWatchers_2()
658662
659663void tst_TouchRegistry::rejectingTouchfterItsEnd()
660664{
661− TouchRegistry touchRegistry;
662665 DummyCandidate earlyCandidate;
663666 DummyCandidate lateCandidate;
664667
@@ -671,16 +674,16 @@ void tst_TouchRegistry::rejectingTouchfterItsEnd()
671674 Qt::NoModifier,
672675 Qt::TouchPointPressed,
673676 touchPoints);
674− touchRegistry.update(&touchEvent);
677+ touchRegistry->update(&touchEvent);
675678 }
676679
677− touchRegistry.addCandidateOwnerForTouch(0, &earlyCandidate);
678− touchRegistry.addCandidateOwnerForTouch(0, &lateCandidate);
680+ touchRegistry->addCandidateOwnerForTouch(0, &earlyCandidate);
681+ touchRegistry->addCandidateOwnerForTouch(0, &lateCandidate);
679682
680683 QVERIFY(earlyCandidate.ownedTouches.isEmpty());
681684 QVERIFY(lateCandidate.ownedTouches.isEmpty());
682685
683− touchRegistry.requestTouchOwnership(0, &lateCandidate);
686+ touchRegistry->requestTouchOwnership(0, &lateCandidate);
684687
685688 QVERIFY(earlyCandidate.ownedTouches.isEmpty());
686689 QVERIFY(lateCandidate.ownedTouches.isEmpty());
@@ -694,25 +697,25 @@ void tst_TouchRegistry::rejectingTouchfterItsEnd()
694697 Qt::NoModifier,
695698 Qt::TouchPointPressed,
696699 touchPoints);
697− touchRegistry.update(&touchEvent);
700+ touchRegistry->update(&touchEvent);
698701 }
699702
700703 QVERIFY(earlyCandidate.ownedTouches.isEmpty());
701704 QVERIFY(lateCandidate.ownedTouches.isEmpty());
702705
703− touchRegistry.removeCandidateOwnerForTouch(0, &earlyCandidate);
706+ touchRegistry->removeCandidateOwnerForTouch(0, &earlyCandidate);
704707
705708 QCOMPARE(lateCandidate.ownedTouches.count(), 1);
706709 QCOMPARE(lateCandidate.ownedTouches.contains(0), 1);
707710
708711 // Check that there's no trace left of touch 0 as we no longer need to keep tabs on it.
709− QVERIFY(!touchRegistry.findTouchInfo(0));
712+ QVERIFY(!touchRegistry->findTouchInfo(0));
710713}
711714
712715void tst_TouchRegistry::removeOldUndecidedCandidates()
713716{
714717 FakeTimerFactory *fakeTimerFactory = new FakeTimerFactory;
715− TouchRegistry *touchRegistry = new TouchRegistry(nullptr, fakeTimerFactory);
718+ touchRegistry->setTimerFactory(fakeTimerFactory);
716719
717720 DummyCandidate undecidedCandidate;
718721 undecidedCandidate.setObjectName("undecided");
@@ -749,8 +752,6 @@ void tst_TouchRegistry::removeOldUndecidedCandidates()
749752 QVERIFY(undecidedCandidate.lostTouches.contains(0));
750753 QVERIFY(candidateThatWantsTouch.ownedTouches.contains(0));
751754 QVERIFY(candidateThatWantsTouch.lostTouches.isEmpty());
752−
753− delete touchRegistry;
754755}
755756
756757/*
@@ -762,7 +763,7 @@ void tst_TouchRegistry::removeOldUndecidedCandidates()
762763void tst_TouchRegistry::interimOwnerWontGetUnownedTouchEvents()
763764{
764765 FakeTimerFactory *fakeTimerFactory = new FakeTimerFactory;
765− TouchRegistry *touchRegistry = new TouchRegistry(nullptr, fakeTimerFactory);
766+ touchRegistry->setTimerFactory(fakeTimerFactory);
766767
767768 DummyCandidate undecidedCandidate;
768769 undecidedCandidate.setObjectName("undecided");
@@ -814,8 +815,6 @@ void tst_TouchRegistry::interimOwnerWontGetUnownedTouchEvents()
814815
815816 QCOMPARE(undecidedCandidate.unownedTouchEvents.count(), 2);
816817 QCOMPARE(interimOwner.unownedTouchEvents.count(), 0);
817−
818− delete touchRegistry;
819818}
820819
821820////////////// TouchMemento //////////