Merge lp://qastaging/~knightrider0xd/openlp/better-sm-preview into lp://qastaging/openlp

Proposed by Ian Knight
Status: Merged
Approved by: Tomas Groth
Approved revision: 2614
Merged at revision: 2629
Proposed branch: lp://qastaging/~knightrider0xd/openlp/better-sm-preview
Merge into: lp://qastaging/openlp
Diff against target: 214 lines (+117/-4)
4 files modified
openlp/core/common/settings.py (+1/-0)
openlp/core/ui/advancedtab.py (+7/-0)
openlp/core/ui/servicemanager.py (+29/-2)
tests/functional/openlp_core_ui/test_servicemanager.py (+80/-2)
To merge this branch: bzr merge lp://qastaging/~knightrider0xd/openlp/better-sm-preview
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Tomas Groth Approve
Review via email: mp+283142@code.qastaging.launchpad.net

Description of the change

Added single click preview for service manager (see attached blueprint)
- Checkbox appears in advanced settings tab.
- When enabled, items will be sent to preview when clicked in service manager, but NOT if double-clicked.

To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote :

It works well and I am surprised as I had my doubts for the feature.

Could we have a race condition where the event fires before the user has managed to activate the double click? They are slow between the first and last clicks or are the time intervals such that there is no chance of it happening.

review: Needs Information
Revision history for this message
Ian Knight (knightrider0xd) wrote :

> It works well and I am surprised as I had my doubts for the feature.

Thanks!

> Could we have a race condition where the event fires before the user has
> managed to activate the double click? They are slow between the first and last
> clicks or are the time intervals such that there is no chance of it happening.

The timeout used to determine the difference between a single and double click uses the QApplication.doubleClickInterval().
The Qt documentation (see links) confirms that this uses the system's timeout value for a double click, even if that value is changed while the program is running, so a race condition should not be possible unless there is an issue with Qt.

http://doc.qt.io/qt-5/qapplication.html#details
http://doc.qt.io/qt-5/qapplication.html#doubleClickInterval-prop

Revision history for this message
Ian Knight (knightrider0xd) wrote :

Just to add to my last comment (sorry about the double post),
Even if the race condition were to occur (which, as outlined above should only be possible where issues occur in Qt), the most that would happen is that the item get sent to both preview and live.

Revision history for this message
Tomas Groth (tomasgroth) :
review: Approve
Revision history for this message
Tim Bentley (trb143) :
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.