D17945: Tutorial screen added for odd even activity

Johnny Jazeix noreply at phabricator.kde.org
Tue Feb 5 18:12:35 GMT 2019

jjazeix added a comment.

  Can you also please do the other changes (files that shouldn't be updated, typos...)?
  Thank you


> TutorialBase.qml:65
> +                     onClicked: {
> +                         if(order === 3 || order === 4) {
> +                              message.text = qsTr("Great")

this is not a maintainable way to check this. Let's assume we want to add a new question, we would think that we only need to add a new Tutorial like Tutorial5 but then we will probably forget to update here.
It would be better to have a boolean telling if we want to find the odd or even number at TutorialBase level, and use it to both set the text and tell if it is good or not on click.

Both button should share the same code (there is AnswerButton that could maybe be used? It also have user feedback).

  R2 GCompris


To: dekumar, #gcompris_improvements, jjazeix
Cc: echarruau, amankumargupta, jjazeix, kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190205/ba2554c2/attachment.html>

More information about the kde-edu mailing list