Merge lp://qastaging/~jonas-drange/ubuntu-settings-components/buffer-printer-state-events into lp://qastaging/~phablet-team/ubuntu-settings-components/printer-components

Proposed by Jonas G. Drange
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 254
Merged at revision: 232
Proposed branch: lp://qastaging/~jonas-drange/ubuntu-settings-components/buffer-printer-state-events
Merge into: lp://qastaging/~phablet-team/ubuntu-settings-components/printer-components
Prerequisite: lp://qastaging/~jonas-drange/ubuntu-settings-components/asyncness
Diff against target: 284 lines (+184/-17)
7 files modified
plugins/Ubuntu/Settings/Printers/CMakeLists.txt (+1/-0)
plugins/Ubuntu/Settings/Printers/models/printermodel.cpp (+8/-13)
plugins/Ubuntu/Settings/Printers/models/printermodel.h (+3/-4)
plugins/Ubuntu/Settings/Printers/printer/printersignalhandler.cpp (+69/-0)
plugins/Ubuntu/Settings/Printers/printer/printersignalhandler.h (+55/-0)
tests/unittests/Printers/CMakeLists.txt (+4/-0)
tests/unittests/Printers/tst_signalhandler.cpp (+44/-0)
To merge this branch: bzr merge lp://qastaging/~jonas-drange/ubuntu-settings-components/buffer-printer-state-events
Reviewer Review Type Date Requested Status
Andrew Hayzen (community) Approve
Unity Team Pending
Review via email: mp+317485@code.qastaging.launchpad.net

Commit message

* adds PrinterSignalHandler that is responsible for handling (some) printer signals.
* uses PrinterSignalHandler in PrinterModel so that i only will update printers a minimum number of times

To post a comment you must log in.
254. By Jonas G. Drange

undoes spurious change

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Looks good and resolves the issue, one question about a possible racy situation - don't think it would happen often (if at all) but maybe we should protect?

review: Needs Information
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

As discussed the signals will get queued [0], so this won't be racy :-)

LGTM \o/

0 - https://wiki.qt.io/Threads_Events_QObjects#Signals_and_slots_across_threads
(...an automatic connection (the default) means that if the thread the receiver is living in is the same as the current thread, a direct connection is used; otherwise, a queued connection is used...)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches