[Code] Incorrect use of public slots in the c++ classes
Bug #1494756 reported by
Nekhelesh Ramananthan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
Low
|
Unassigned | ||
Ubuntu Clock App |
Fix Released
|
Low
|
Nekhelesh Ramananthan |
Bug Description
It seems I have been incorrectly using public slots when creating the c++ classes. This link [1] explains clearly the distinction between Q_INVOKABLE and public slot functions.
To summarize, if a function is a SLOT and connected to a signal, only then should it be included under public slots. On the other hand, if we just want to call them from the QML side without any connection to signals, then it is better to define them as Q_INVOKABLE.
All Q_INVOKABLE functions are public slot functions, but all public slot functions are not Q_ONVOKABLE functions.
This is a recommendation and about using the right declaration.
Related branches
lp:~nik90/ubuntu-clock-app/correct-public-slots
- Bartosz Kosiorek: Approve
- Ubuntu Phone Apps Jenkins Bot: Approve (continuous-integration)
-
Diff: 68 lines (+16/-17)3 files modifiedbackend/modules/Alarm/sound.h (+11/-12)
backend/modules/Stopwatch/formattime.h (+4/-5)
debian/changelog (+1/-0)
Changed in ubuntu-clock-app: | |
status: | Triaged → In Progress |
Changed in canonical-devices-system-image: | |
importance: | Undecided → Low |
milestone: | none → ww46-2015 |
status: | New → Confirmed |
Changed in ubuntu-clock-app: | |
status: | Fix Committed → Fix Released |
Changed in canonical-devices-system-image: | |
status: | Confirmed → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fix committed into lp:ubuntu-clock-app at revision 381, scheduled for release in ubuntu-clock-app, milestone 3.6