[{"id":2444,"web_url":"https://patchwork.libcamera.org/comment/2444/","msgid":"<20190817151530.GT16603@wyvern>","date":"2019-08-17T15:15:30","subject":"Re: [libcamera-devel] [PATCH 18/18] test: Simplify tests with\n\tparent-child relationships","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your work.\n\nOn 2019-08-12 15:46:42 +0300, Laurent Pinchart wrote:\n> Create object instances with a parent to avoid the need for reparenting\n> objects manually.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  test/event-thread.cpp | 8 +-------\n>  test/timer-thread.cpp | 8 +-------\n>  2 files changed, 2 insertions(+), 14 deletions(-)\n> \n> diff --git a/test/event-thread.cpp b/test/event-thread.cpp\n> index 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{\n> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> index 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> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-ed1-x541.google.com (mail-ed1-x541.google.com\n\t[IPv6:2a00:1450:4864:20::541])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 14D1E600F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 17 Aug 2019 17:15:34 +0200 (CEST)","by mail-ed1-x541.google.com with SMTP id p28so7556771edi.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 17 Aug 2019 08:15:34 -0700 (PDT)","from localhost ([185.224.57.161]) by smtp.gmail.com with ESMTPSA id\n\ti22sm1239534ejh.6.2019.08.17.08.15.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 17 Aug 2019 08:15:33 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=n1TTAZbK7x3E+shXoIUDY/ZbXov6e73R/cphcHMmufA=;\n\tb=071gzXdeCINc9GUZO7wvB7CenlrYs5+vEesUdGnxfdQYngKhfSi0lx4USX2CXVtvcf\n\tyj/Hgw457hDeuQMgyOB055V1V5oeMI3Fv81L9gX14ACsLr18rcwHQ+DWy/qNiIQkMh42\n\tF4K6FFsp8jtnglHldWmLfkeFsBozXqzSGTIeoGgBwdiCaQh1rjWf+LdXmprGRreTTTyM\n\tmlP+ECO34ejPkJ6K60CDka3vsf+u6ivGpQ64ltJQN3KzzSMkouir0sFTuWQa3Ztq4O5T\n\thdVinjD2uFT/0jybowaPZ0owR7GT3mWun/ApWX9hOJXedM9WfXHifrd0P4dEir/T85sV\n\tN4jw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=n1TTAZbK7x3E+shXoIUDY/ZbXov6e73R/cphcHMmufA=;\n\tb=iOyRd2Gh43IVI3SPhwc6vMoIxInloor2IHCztHBsCpDkrS+4TYjyxMITfragB/OSNl\n\tnqcNiNNaYFuEtei0d30Jxeq7YFwmXY8Z5Oq/4/znFvTDcBNGOjr4HUccy/h3ktTNpU8q\n\tF+uSOMuID1ojFHQF/gC7C5SvxiF6QmBpurL95ou7jshKEAAEtJt180AiKP2NIiYJlUbs\n\tMYJ1HH5qnMEk/wTkkC9PggQIkE9Se3F6VhnTGCy8B0abHP7ejoSY+44lOXgR4GA67qq0\n\tHbquKgDx6/e8Fzpfd3kjDjI8eXKIV94fo9EcSLUAAFFzrDtspj76OD+9DHmuV8fi9MbR\n\tRe2w==","X-Gm-Message-State":"APjAAAVc+5uy/sthvkE7JS82IYfcIxPc2QWWK2GHxl+awv/4a9xZZXt/\n\tiBv3S9UchP9fP/dsZwrRwWImbLxySfs=","X-Google-Smtp-Source":"APXvYqx/2w2TnsV3g9pjSIGImHlxS2noof2mS6q57O+ufHhySfTFWit8az4uw8XGtaTL4J6pDbWNWA==","X-Received":"by 2002:a05:6402:3c8:: with SMTP id\n\tt8mr16571508edw.211.1566054933816; \n\tSat, 17 Aug 2019 08:15:33 -0700 (PDT)","Date":"Sat, 17 Aug 2019 17:15:30 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190817151530.GT16603@wyvern>","References":"<20190812124642.24287-1-laurent.pinchart@ideasonboard.com>\n\t<20190812124642.24287-19-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190812124642.24287-19-laurent.pinchart@ideasonboard.com>","User-Agent":"Mutt/1.12.1 (2019-06-15)","Subject":"Re: [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":"Sat, 17 Aug 2019 15:15:34 -0000"}}]