GoldenCheetah
GoldenCheetah copied to clipboard
Port to Qt6
Hi, I just wanted to let you know about the current state of my efforts to build with Qt 6.2 (dev branch)
With all the changes in the pull requests I created, I just compiled and linked GoldenCheetah successfully with Qt 6.2. No testing has been done so far on any of the pull requests I created.
Next would be testing, modifying the patches to work with both Qt5 and Qt6, and sorting out some remaining issues. Most of the pull requests I created a very low risk, I assume. But some need more testing, most prominently the Qwt upgrade https://github.com/GoldenCheetah/GoldenCheetah/pull/3956 and the QRegExp->QRegularExpression transition https://github.com/GoldenCheetah/GoldenCheetah/pull/3960 . Unfortunately, I will run out of time allocated for this project soon and won't be able to finish it. I'll have to stop working on GoldenCheetah and the open pull requests.
Anyway, I hope that the sequence of pull request generated will be of value to you and I will be around if you have any questions.
Did your GC 6.2QT build actually startup ?
Yes, it started. It loaded the stored activities. It segfaulted after a few clicks.
All Qt6 Refactor PRs are merged and master builds using Qt 6.2.4 (without R, Python and KML for now):
We can start testing!
Thank you Ale and so good to see Andreas’ work finally committed. Will look at python integration. Now might be the time to drop R support?
Also need to get Andreas on the about box contributors list- this was a fantastic effort !
Hi Mark, I added Andreas to About Box in https://github.com/GoldenCheetah/GoldenCheetah/commit/1fb92d1bf5cdf68ae6783cf7a5b0eb978416e5a1
It looks like R/Python issues are similar to the ones fixed by Andreas, I think we can fix them following the same pattern, not sure about KML since it uses Boost, perhaps we could drop it.
KML is dropped on Windows already I think? Anyway I think it can be dropped, maybe we clean out in 3.7 since there are lots of features almost no one uses
KML is dropped on Windows already I think?
In official builds is dropped for macOS and no one has ever complained, it is included for Windows and Linux builds, but I don't know if it is used.
Anyway I think it can be dropped, maybe we clean out in 3.7 since there are lots of features almost no one uses
Agree, for now I will exclude it from my builds.
Hi, it is great to see that you found the time to merge all merge requests. Thanks a lot for adding me to the list of contributors, I appreciate it. 😃
I continued testing my Windows build using Qt 6.2.4 and it is working pretty well. Except for R/Python which I am planning to review later, all remaining charts in all 3 views are working and they look nice and responsive, even overlay widgets over VLC video is working to my surprise. @andreasbuhr do you have any recommendation about what QT6 version we should target?
@andreasbuhr do you have any recommendation about what QT6 version we should target?
No sorry. I changed jobs in January 2023 and I am not that deep in Qt any more.
Update: Python charts are working when building with Qt 6.2.4 after replacing QRegExp by QRegularExpression in https://github.com/GoldenCheetah/GoldenCheetah/commit/1f999a3957ed9e861c46a0bb3490d5c1c0dfc066 and https://github.com/GoldenCheetah/GoldenCheetah/commit/8e2eb3fc1894ba853dbed46f11fbad83187f95d9
Nice one, was worried this was going to be much harder !
@andreasbuhr congratulations on your new job - albeit a year late :)
Update: R Charts are also working when building master with Qt 6.2.4 (95b4a4969c2af4f6342d07fc44aae536fd185194 and 4b4006002efdfbe35664a13eeec03680691a4522)
Update: CloudDB client code in master is adapted to Qt 6.2.4 too (894eb421e33945a8a319e7f60bcf89b215ce63cf, 21faf53d3ce577ea645c3a584c7f0ff19fa9d1ff, e95608e4bc346474360dd1912baa0a46d13635fd and c553de5216b7de4087aad2a4dd59d9e4a16c159e)
Update: installing libkml-dev package on Ubuntu 22.04, enabling KML, and building master using Qt 6.2.4 is working, no additional changes required.
Agree to drop it. Not sure if anybody uses this feature at all. With the port to QT6 I also suggest to put the "WindowsSDK" to status "deprecated".
Am Di., 16. Jan. 2024 um 20:51 Uhr schrieb Alejandro Martinez < @.***>:
KML is dropped on Windows already I think?
In official builds KML is dropped on macOS, on Windows a libkml and Boost version from https://github.com/GoldenCheetah/WindowsSDK are being used, these were built by @Joern-R https://github.com/Joern-R long time ago, IIRC.
Anyway I think it can be dropped, maybe we clean out in 3.7 since there are lots of features almost no one uses
For now I am dropping it from my Windows builds, I will give it another try when I start building on Linux.
— Reply to this email directly, view it on GitHub https://github.com/GoldenCheetah/GoldenCheetah/issues/3983#issuecomment-1894410105, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZFBE3NOLMYUXPXGHTJBU3YO3K2ZAVCNFSM5BAM4RR2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBZGQ2DCMBRGA2Q . You are receiving this because you were mentioned.Message ID: @.***>
Update: Python charts are working when building with Qt 6.2.4 after replacing QRegExp by QRegularExpression in 1f999a3 and 8e2eb3f
I think the signals are not connected, so no output occurs?
[11:02:19.724] warning: QObject::connect: No such slot GenericChart::addCurve(QString,QVector
,QVector ,QStringList,QString,QString,QStringList,QStringList,int,int,int,QString,int,bool,bool,bool,bool) in ../src/Charts/PythonChart.cpp:465 (unknown:0) [11:02:19.963] warning: QObject::connect: No such slot GenericChart::addCurve(QString,QVector ,QVector ,QStringList,QString,QString,QStringList,QStringList,int,int,int,QString,int,bool,bool,bool,bool) in ../src/Charts/PythonChart.cpp:465 (unknown:0)
Agree to drop it. Not sure if anybody uses this feature at all.
May be we can ask in users forum (?)
With the port to QT6 I also suggest to put the "WindowsSDK" to status "deprecated".
For now we are using some components in AppVeyor builds, since the ABI has not change they still useful.
Update: Python charts are working when building with Qt 6.2.4 after replacing QRegExp by QRegularExpression in 1f999a3 and 8e2eb3f
I think the signals are not connected, so no output occurs?
[11:02:19.724] warning: QObject::connect: No such slot GenericChart::addCurve(QString,QVector,QVector,QStringList,QString,QString,QStringList,QStringList,int,int,int,QString,int,bool,bool,bool,bool) in ../src/Charts/PythonChart.cpp:465 (unknown:0) [11:02:19.963] warning: QObject::connect: No such slot GenericChart::addCurve(QString,QVector,QVector,QStringList,QString,QString,QStringList,QStringList,int,int,int,QString,int,bool,bool,bool,bool) in ../src/Charts/PythonChart.cpp:465 (unknown:0)
Yes, I should have qualified that affirmation, neither of R/Python charts I use and tested use GC Charts, only R Graphics Device/Web Chart.
If we migrate to the new connect syntax, can this be detected at compile time instead of runtime?
Update: Python charts are working when building with Qt 6.2.4 after replacing QRegExp by QRegularExpression in 1f999a3 and 8e2eb3f
I think the signals are not connected, so no output occurs?
[11:02:19.724] warning: QObject::connect: No such slot GenericChart::addCurve(QString,QVector,QVector,QStringList,QString,QString,QStringList,QStringList,int,int,int,QString,int,bool,bool,bool,bool) in ../src/Charts/PythonChart.cpp:465 (unknown:0) [11:02:19.963] warning: QObject::connect: No such slot GenericChart::addCurve(QString,QVector,QVector,QStringList,QString,QString,QStringList,QStringList,int,int,int,QString,int,bool,bool,bool,bool) in ../src/Charts/PythonChart.cpp:465 (unknown:0)
Yes, I should had qualified that affirmation, neither of R/Python charts I use and tested use GC Charts, only R Graphics Device/Web Chart.
I we migrate to the new connect syntax, can this be detected at compile time instead of runtime?
No worries at all- will look at it today
I think the signals are not connected, so no output occurs?
[11:02:19.724] warning: QObject::connect: No such slot GenericChart::addCurve(QString,QVector,QVector,QStringList,QString,QString,QStringList,QStringList,int,int,int,QString,int,bool,bool,bool,bool) in ../src/Charts/PythonChart.cpp:465 (unknown:0)
The problem was caused by https://github.com/GoldenCheetah/GoldenCheetah/commit/466bdf19397addda4e263d8dd506061392f31ff1, after reversion (https://github.com/GoldenCheetah/GoldenCheetah/commit/42aa24108c1245955f2e3cfdebce464cb3bbda3b) Python Charts work with GC Charts when building with Qt6
Update: 2 crashes due to dereferencing the end() iterator were fixed (https://github.com/GoldenCheetah/GoldenCheetah/commit/bf28d7398ce224051a0538407f39d913b9eba15d and https://github.com/GoldenCheetah/GoldenCheetah/commit/573967fe47164855a6defbe7f157fc3a15a18b8a), while these go silent on Qt5 they crash on Qt6.
Main pending issue for me now when building with Qt6 is Metric Trends chart not being correctly saved.
They work initially (new Athlete or existing one used with Qt5 build) and also after View > Reset Layout / Charts > Reset to default, but they become blank after GoldenCheetah restart.
Exporting the same chart (PMC) with the versions using Qt 5.15.2 and Qt 6.5.3 they differ only in LTMSettings, the former can be imported on either version and the second gives a blank chart on both. Supposedly the difference should come from:
https://github.com/GoldenCheetah/GoldenCheetah/blob/573967fe47164855a6defbe7f157fc3a15a18b8a/src/Charts/GoldenCheetah.cpp#L970-L976
This makes Qt6 builds unusable, except for testing purposes, I couldn't find the cause yet.
Thanks a lot for your work, master also builds with Qt 6.6.1 on archlinux (same problem with the Metric Trends chart). QT_QPA_PLATFORM=wayland is now supported with the Qt 6 build and it runs perfectly on Sway.
Main pending issue for me now when building with Qt6 is Metric Trends chart not being correctly saved.
Fixed by https://github.com/GoldenCheetah/GoldenCheetah/commit/4224fd193cb425ce2a4d0b23ff6e8e06b95193b1, solution was trivial, to find the cause, not so much :(