Summary: | Available answer buttons do not register the answer. | ||
---|---|---|---|
Product: | [Applications] minuet | Reporter: | Ryan <ryan> |
Component: | user-interface | Assignee: | Sandro Andrade <sandroandrade> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | pablo.bianchi+kde |
Priority: | NOR | ||
Version First Reported In: | 0.4.0.24083 | ||
Target Milestone: | --- | ||
Platform: | Flatpak | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ryan
2024-05-18 04:29:09 UTC
Correction: The current video driver is nvidia.
> prime-select get-current
Driver configured: nvidia
NVIDIA modules are loaded
ExerciseView.qml is the code in question: https://github.com/KDE/minuet/blob/ab3fcedec21096ed1166e6872b9160705538bb84/src/app/qml/ExerciseView.qml#L317 Based on the documentation documentation here https://doc.qt.io/qt-6/qml-qtquick-mousearea.html, here https://doc.qt.io/qt-6/qtqml-syntax-objectattributes.html, and here https://doc.qt.io/qt-6/qtqml-syntax-signals.html#property-change-signal-handlers), my best guesses as a non-developer are these: (a) Line 317 is missing an object declaration needed to explicitly point to the onExit handler or set a property. (b) Line 317 should use the `exited()` signal instead of `onExited` handler. (c) >313 MouseArea { >314 anchors.fill: parent >315 onClicked: { >316 if (exerciseView.state == "waitingForAnswer" && !animation.running) { >317 onExited() >... >322 } >323 } ExerciseView.qml also includes the onExited handler. I think this is irrelevant, because hovering over and exiting the button area work as expected (activate/deactivate shading and the piano animation). > onExited: { > answerRectangle.color = internal.colors[answerRectangle.index%internal.colors.length] > if (currentExercise["playMode"] != "rhythm") { > if (parent.parent == answerGrid) { > if (!animation.running) > model.sequence.split(' ').forEach(function(note) { > pianoView.noteUnmark(0, core.exerciseController.chosenRootNote() + parseInt(note), 0) > }) > sheetMusicView.model = [core.exerciseController.chosenRootNote()] > } > } > else { > var rightAnswers = core.exerciseController.selectedExerciseOptions > if (parent.parent == yourAnswersParent && internal.userAnswers[position].name != rightAnswers[position].name) { > parent.border.color = "red" > parent.color = internal.userAnswers[position].color > rhythmImage.source = "exercise-images/" + internal.userAnswers[position].name + ".png" > } > } > } > } I have this issue with the recently installed from Flatpack 0.4.0.24083 version. By running with `flatpak run org.kde.minuet` I get ``` qrc:/ExerciseView.qml:317: TypeError: Property 'onExited' of object QQuickMouseArea(0x559a079f1770) is not a function ``` every time I click an answer. (In reply to PabloAB from comment #3) > I have this issue with the recently installed from Flatpack 0.4.0.24083 > version. By running with `flatpak run org.kde.minuet` I get > ``` > qrc:/ExerciseView.qml:317: TypeError: Property 'onExited' of object > QQuickMouseArea(0x559a079f1770) is not a function > ``` > every time I click an answer. Note that you can still generate a new question by clicking "Give up". The answer buttons worked in a previous version, so reverting or comparing the code might be helpful. This seems likely to be an easy fix for someone who knows the language. Fixed no later than minuet 24.12.3-1.2 |