From fb1a5c0416ebd516a5ef01ba76deed1b602828ba Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Sun, 27 Oct 2019 02:45:17 +0200 Subject: libcamera: object: Add connection type parameter to invokeMethod() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow specifying a different connection type than ConnectionTypeQueued for Object::invokeMethod(). Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- test/object-invoke.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'test/object-invoke.cpp') diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp index 37a27440..f6ae2604 100644 --- a/test/object-invoke.cpp +++ b/test/object-invoke.cpp @@ -64,10 +64,11 @@ protected: InvokedObject object; /* - * Test that method invocation in the same thread goes through - * the event dispatcher. + * Test that queued method invocation in the same thread goes + * through the event dispatcher. */ - object.invokeMethod(&InvokedObject::method, 42); + object.invokeMethod(&InvokedObject::method, + ConnectionTypeQueued, 42); if (object.status() != InvokedObject::NoCall) { cerr << "Method not invoked asynchronously" << endl; @@ -93,15 +94,16 @@ protected: } /* - * Move the object to a thread and verify that the method is - * delivered in the correct thread. + * Move the object to a thread and verify that auto method + * invocation is delivered in the correct thread. */ object.reset(); object.moveToThread(&thread_); thread_.start(); - object.invokeMethod(&InvokedObject::method, 42); + object.invokeMethod(&InvokedObject::method, + ConnectionTypeAuto, 42); this_thread::sleep_for(chrono::milliseconds(100)); switch (object.status()) { -- cgit v1.2.1