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>
This commit is contained in:
@@ -9,12 +9,11 @@
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
#include <libcamera/camera_manager.h>
|
||||
#include <libcamera/event_dispatcher.h>
|
||||
#include <libcamera/object.h>
|
||||
|
||||
#include "thread.h"
|
||||
#include "test.h"
|
||||
#include "thread.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace libcamera;
|
||||
@@ -61,7 +60,7 @@ class ObjectInvokeTest : public Test
|
||||
protected:
|
||||
int run()
|
||||
{
|
||||
EventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();
|
||||
EventDispatcher *dispatcher = Thread::current()->eventDispatcher();
|
||||
InvokedObject object;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user