Merge lp:~aacid/qtmir/timer_thread into lp:qtmir

Proposed by Albert Astals Cid on 2015-02-20
Status: Merged
Approved by: Gerry Boland on 2015-02-20
Approved revision: 320
Merged at revision: 320
Proposed branch: lp:~aacid/qtmir/timer_thread
Merge into: lp:qtmir
Diff against target: 13 lines (+2/-1)
1 file modified
src/modules/Unity/Application/mirsurfaceitem.cpp (+2/-1)
To merge this branch: bzr merge lp:~aacid/qtmir/timer_thread
Reviewer Review Type Date Requested Status
Gerry Boland 2015-02-20 Approve on 2015-02-20
PS Jenkins bot continuous-integration Approve on 2015-02-20
Review via email: mp+250423@code.launchpad.net

Commit Message

Don't start timer from the thread it doesn't belong to

Qt doesn't like it

To post a comment you must log in.
Gerry Boland (gerboland) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/modules/Unity/Application/mirsurfaceitem.cpp'
2--- src/modules/Unity/Application/mirsurfaceitem.cpp 2015-02-09 16:28:50 +0000
3+++ src/modules/Unity/Application/mirsurfaceitem.cpp 2015-02-20 10:09:58 +0000
4@@ -462,7 +462,8 @@
5 if (m_surface->buffers_ready_for_compositor(userId) > 0) {
6 QTimer::singleShot(0, this, SLOT(update()));
7 // restart the frame dropper so that we have enough time to render the next frame.
8- m_frameDropperTimer.start();
9+ // queued since the timer lives in a different thread
10+ QMetaObject::invokeMethod(&m_frameDropperTimer, "start", Qt::QueuedConnection);
11 }
12
13 m_textureProvider->smooth = smooth();

Subscribers

People subscribed via source and target branches