From fd0087b5d8608eb1dc1e1a3da5ddafd83d43fc79 Mon Sep 17 00:00:00 2001
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: Sun, 18 Aug 2019 03:11:27 +0300
Subject: test: Get event dispatcher from current thread

For all tests that don't otherwise require access to the camera manager,
get the event dispatcher from the current thread instead of the camera
manager. This prepares for the removal of CameraManager::instance().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
---
 test/process/process_test.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'test/process')

diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp
index acb16145..d264555e 100644
--- a/test/process/process_test.cpp
+++ b/test/process/process_test.cpp
@@ -9,12 +9,12 @@
 #include <unistd.h>
 #include <vector>
 
-#include <libcamera/camera_manager.h>
 #include <libcamera/event_dispatcher.h>
 #include <libcamera/timer.h>
 
 #include "process.h"
 #include "test.h"
+#include "thread.h"
 #include "utils.h"
 
 using namespace std;
@@ -41,7 +41,7 @@ public:
 protected:
 	int run()
 	{
-		EventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();
+		EventDispatcher *dispatcher = Thread::current()->eventDispatcher();
 		Timer timeout;
 
 		int exitCode = 42;
-- 
cgit v1.2.1