From 6b6c02e2236c22136c7b0d8d7141dd19dd0d6386 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 17 Oct 2019 02:18:20 +0300 Subject: qcam: Support Qt versions earlier than 5.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The QtEventDispatcher timers implementation depends on Qt 5.9 or newer due to the use of QObject::startTimer(std::chrono::milliseconds). Support earlier Qt versions by using the QObject::startTimer(int) version instead. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/qcam/qt_event_dispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qcam/qt_event_dispatcher.cpp') diff --git a/src/qcam/qt_event_dispatcher.cpp b/src/qcam/qt_event_dispatcher.cpp index 9e989bef..2780c912 100644 --- a/src/qcam/qt_event_dispatcher.cpp +++ b/src/qcam/qt_event_dispatcher.cpp @@ -117,7 +117,7 @@ void QtEventDispatcher::registerTimer(Timer *timer) std::chrono::steady_clock::duration duration = timer->deadline() - now; std::chrono::milliseconds msec = std::chrono::duration_cast(duration); - int timerId = startTimer(msec); + int timerId = startTimer(msec.count()); timers_[timerId] = timer; timerIds_[timer] = timerId; } -- cgit v1.2.1