From 1554d0b6e645da7b3345436f8c7264823cbe0151 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 12 Aug 2019 14:37:38 +0300 Subject: libcamera: Add parent argument to constructors of Object-derived classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that the Object class implements parent-child relationships, make it possible to create EventNotifier and Timer instances with a parent by adding a parent argument to their constructors. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- include/libcamera/event_notifier.h | 2 +- include/libcamera/timer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/libcamera/event_notifier.h b/include/libcamera/event_notifier.h index f80945c7..a37b02ee 100644 --- a/include/libcamera/event_notifier.h +++ b/include/libcamera/event_notifier.h @@ -23,7 +23,7 @@ public: Exception, }; - EventNotifier(int fd, Type type); + EventNotifier(int fd, Type type, Object *parent = nullptr); virtual ~EventNotifier(); Type type() const { return type_; } diff --git a/include/libcamera/timer.h b/include/libcamera/timer.h index 853808e0..f47b6a58 100644 --- a/include/libcamera/timer.h +++ b/include/libcamera/timer.h @@ -19,7 +19,7 @@ class Message; class Timer : public Object { public: - Timer(); + Timer(Object *parent = nullptr); ~Timer(); void start(unsigned int msec); -- cgit v1.2.1