From 778f6b1d7070ddc5b920764d5233e318b15ccf12 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 12 Aug 2019 14:42:51 +0300 Subject: test: Simplify tests with parent-child relationships MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create object instances with a parent to avoid the need for reparenting objects manually. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- test/timer-thread.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'test/timer-thread.cpp') diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp index b9373050..5c1b4ac4 100644 --- a/test/timer-thread.cpp +++ b/test/timer-thread.cpp @@ -20,7 +20,7 @@ class TimeoutHandler : public Object { public: TimeoutHandler() - : timeout_(false) + : timer_(this), timeout_(false) { timer_.timeout.connect(this, &TimeoutHandler::timeoutHandler); timer_.start(100); @@ -31,12 +31,6 @@ public: return timeout_; } - void moveToThread(Thread *thread) - { - Object::moveToThread(thread); - timer_.moveToThread(thread); - } - private: void timeoutHandler(Timer *timer) { -- cgit v1.2.1