{"id":1796,"url":"https://patchwork.libcamera.org/api/1.1/patches/1796/?format=json","web_url":"https://patchwork.libcamera.org/patch/1796/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20190812124642.24287-19-laurent.pinchart@ideasonboard.com>","date":"2019-08-12T12:46:42","name":"[libcamera-devel,18/18] test: Simplify tests with parent-child relationships","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"465da85dcfdd2f26af2279aea39e10fc6fda442b","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/1796/mbox/","series":[{"id":455,"url":"https://patchwork.libcamera.org/api/1.1/series/455/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=455","date":"2019-08-12T12:46:24","name":"Object & Thread enhancements","version":1,"mbox":"https://patchwork.libcamera.org/series/455/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1796/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1796/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A34260E38\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Aug 2019 14:46:56 +0200 (CEST)","from pendragon.bb.dnainternet.fi\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 95E7713CC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Aug 2019 14:46:55 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1565614015;\n\tbh=9FXzsXVjHAzgwSwp7ID6YmB7uFpW5JN8wCJsYD6umN0=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Tub1ZnCwvvJqz9fCpxVY/GMcNUt1fVxEFRROjncMn7R7VZ6bQ1N4Iqn81rr6tYRf/\n\tFfmGYqP2qaGVtNlt7m8uBGTc+WJUuvXBTkNsPd30J0yOU1dWkKmZdmx0ksRB5VgOm+\n\tS9LZyjAw1SxfJZTHRR1cXnzH2xOVJy6kpF7NFbzU=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 12 Aug 2019 15:46:42 +0300","Message-Id":"<20190812124642.24287-19-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.21.0","In-Reply-To":"<20190812124642.24287-1-laurent.pinchart@ideasonboard.com>","References":"<20190812124642.24287-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 18/18] test: Simplify tests with\n\tparent-child relationships","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 12 Aug 2019 12:46:56 -0000"},"content":"Create object instances with a parent to avoid the need for reparenting\nobjects manually.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/event-thread.cpp | 8 +-------\n test/timer-thread.cpp | 8 +-------\n 2 files changed, 2 insertions(+), 14 deletions(-)","diff":"diff --git a/test/event-thread.cpp b/test/event-thread.cpp\nindex 4a82d49b94f1..58f452339f87 100644\n--- a/test/event-thread.cpp\n+++ b/test/event-thread.cpp\n@@ -26,7 +26,7 @@ public:\n \t{\n \t\tpipe(pipefd_);\n \n-\t\tnotifier_ = new EventNotifier(pipefd_[0], EventNotifier::Read);\n+\t\tnotifier_ = new EventNotifier(pipefd_[0], EventNotifier::Read, this);\n \t\tnotifier_->activated.connect(this, &EventHandler::readReady);\n \t}\n \n@@ -60,12 +60,6 @@ public:\n \t\treturn notified_;\n \t}\n \n-\tvoid moveToThread(Thread *thread)\n-\t{\n-\t\tObject::moveToThread(thread);\n-\t\tnotifier_->moveToThread(thread);\n-\t}\n-\n private:\n \tvoid readReady(EventNotifier *notifier)\n \t{\ndiff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\nindex b9373050068c..5c1b4ac4a401 100644\n--- a/test/timer-thread.cpp\n+++ b/test/timer-thread.cpp\n@@ -20,7 +20,7 @@ class TimeoutHandler : public Object\n {\n public:\n \tTimeoutHandler()\n-\t\t: timeout_(false)\n+\t\t: timer_(this), timeout_(false)\n \t{\n \t\ttimer_.timeout.connect(this, &TimeoutHandler::timeoutHandler);\n \t\ttimer_.start(100);\n@@ -31,12 +31,6 @@ public:\n \t\treturn timeout_;\n \t}\n \n-\tvoid moveToThread(Thread *thread)\n-\t{\n-\t\tObject::moveToThread(thread);\n-\t\ttimer_.moveToThread(thread);\n-\t}\n-\n private:\n \tvoid timeoutHandler(Timer *timer)\n \t{\n","prefixes":["libcamera-devel","18/18"]}