diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-08-12 14:37:38 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-08-17 18:47:17 +0300 |
commit | 1554d0b6e645da7b3345436f8c7264823cbe0151 (patch) | |
tree | 1c95832fbaf8a1cd4388c8d33b4759bd96599af4 /include | |
parent | 2b25819ec07e8de0b4be658c7d46f6c1c495766d (diff) |
libcamera: Add parent argument to constructors of Object-derived classes
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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/event_notifier.h | 2 | ||||
-rw-r--r-- | include/libcamera/timer.h | 2 |
2 files changed, 2 insertions, 2 deletions
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); |