Error Occurs due the DialogChooseLevel
AbandonedPublic

Authored by jjazeix on Dec 29 2019, 7:26 PM.

Details

Summary

We use

property var levels : activity.datasetLoader.item.data

to fetch the data from the json format in the variable level. This was done before the updating of the multiple_dataset branch. But now after the updating the multiple_dataset branch the core elemen DialogChooseLevel has been updated with new object at line 156 selectedInConfig and

proptery var levels : acitivity.datasetLoader.data

has been added .item has been removed. This gives

qrc:/gcompris/src/core/DialogChooseLevel.qml:156: TypeError: Property 'includes' of object 1,3,4 is not a function

in DialogChooseLevel.qml. Due to this the datasets won't show in our config window even when we implemented them.

Diff Detail

Repository
R2 GCompris
Lint
Lint Skipped
Unit
Unit Tests Skipped
sambhavkaul created this revision.Dec 29 2019, 7:26 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptDec 29 2019, 7:26 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
sambhavkaul requested review of this revision.Dec 29 2019, 7:26 PM
sambhavkaul edited the summary of this revision. (Show Details)
sambhavkaul edited the summary of this revision. (Show Details)Dec 30 2019, 7:11 AM
dekumar added a subscriber: dekumar.EditedDec 30 2019, 5:03 PM
{ "selectedInConfig": function() {chosenLevels.includes(currentFile.level)}}

@echarruau I think you were right as it is due to the function used. As updating Qt to greater version didn't removed the error. As renaming the above function as shown above removes the error and the problem is also resolved.
@sambhavkaul You can update your code it would work fine than.
Thanks!

qrc:/gcompris/src/core/DialogChooseLevel.qml:321:46: Unable to assign [undefined] to bool

@echarruau After renaming it this error is occuring in the terminal while opening any of the multiple dataset activities.
@jjazeix Can you please check once why this is happening?

Please don't use diff on existing code to ask for issues.
Updating Qt to 5.12 or above should have fixed it. Anyway, I just pushed a fix for this in the branch.

jjazeix commandeered this revision.Jan 4 2020, 6:05 PM
jjazeix abandoned this revision.
jjazeix edited reviewers, added: sambhavkaul; removed: jjazeix.