Bug 463933 - Missing charts (qtcharts dependency) in fractions activity
Summary: Missing charts (qtcharts dependency) in fractions activity
Alias: None
Product: gcompris
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Jazeix Johnny
Depends on:
Reported: 2023-01-06 18:34 UTC by Karl Ove Hufthammer
Modified: 2023-01-06 21:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2023-01-06 18:34:48 UTC
When I launch the new fraction activity, no chart is displayed on the screen, only a fraction. So the activity makes no sense. (The help file says ‘A shape split in equal parts is displayed on screen.‘, but no shape is shown.)

On the terminal, I found this error message:
qrc:/gcompris/src/activities/fractions_create/PieChart.qml:7:1: module "QtCharts" is not installed
After I installed the libqt5-qtcharts-imports package on my system (openSUSE Tumbleweed), everything works correctly (a pie chart is shown).

So this bug is really about the build system. I can build GCompris without having libqt5-qtcharts-imports installed, and there are no errors or warnings indicating this, only a non-functioning activity.

1. Build GCompris without the Qt Charts library installed (using the cmake command).
2. Start the fraction activity

Not chart displayed.

When running cmake, there should be an error that the Qt Charts library is missing.
(Alternatively, the two fraction activities should be automatically disabled due to a missing dependency. But I prefer an error, as it is easy to overlook disabled activities.)

Operating System: openSUSE Tumbleweed 20230102
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 6.1.1-1-default (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-2500 CPU @ 3.30GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2
Manufacturer: MSI
Product Name: MS-7673
System Version: 1.0
Comment 1 Jazeix Johnny 2023-01-06 21:23:57 UTC
thank you for reporting this issue (and all the other ones!).

To be sure, did you compile it yourself and not used ? It should not affect the releases we make as we always ship the qml charts plugin, but it could affect distributions if they don't update their requirements (I've added a reminder to specify it for when we send a mail to packagers after the release) and those who compile themselves.

QtCharts is a qml plugin, like  box2d (used for balancebox, land_safe and submarine).
For now, for box2d, we check at runtime if the plugin is present and we display the activities only if the plugin is present.

It's not ideal as we silently remove the activities... I'll check again if there is a possibility to keep the activities displayed, and when we click on them, having a dialog telling the plugin is missing.
Comment 2 Karl Ove Hufthammer 2023-01-06 21:32:56 UTC
Yes, I compiled it myself (using cmake and Ninja).
Comment 3 Karl Ove Hufthammer 2023-01-06 21:34:01 UTC
That is, I compiled GCompris myself. I used my distro‘s package of the Qt Charts plugin (which isn’t installed by default).