[Code] Incorrect use of public slots in the c++ classes

Bug #1494756 reported by Nekhelesh Ramananthan
6
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.

[1] https://supportforums.blackberry.com/t5/Native-Development/public-Q-SLOTS-vs-Q-INVOKABLE/td-p/3073607

Related branches

Changed in ubuntu-clock-app:
status: Triaged → In Progress
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-clock-app at revision 381, scheduled for release in ubuntu-clock-app, milestone 3.6

Changed in ubuntu-clock-app:
status: In Progress → Fix Committed
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.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.