Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Qt6 #3983

Open
andreasbuhr opened this issue Jul 26, 2021 · 26 comments
Open

Port to Qt6 #3983

andreasbuhr opened this issue Jul 26, 2021 · 26 comments
Labels
QT6 Refactor Updating code to move to QT 6
Milestone

Comments

@andreasbuhr
Copy link
Contributor

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 #3956 and the QRegExp->QRegularExpression transition #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.

@liversedge liversedge added the QT6 Refactor Updating code to move to QT 6 label Jul 28, 2021
@liversedge liversedge added this to the 3.7 milestone Jul 28, 2021
@liversedge
Copy link
Member

Did your GC 6.2QT build actually startup ?

@andreasbuhr
Copy link
Contributor Author

Yes, it started. It loaded the stored activities. It segfaulted after a few clicks.

@amtriathlon
Copy link
Member

amtriathlon commented Jan 13, 2024

All Qt6 Refactor PRs are merged and master builds using Qt 6.2.4 (without R, Python and KML for now):

image

We can start testing!

PS: thank you very much, Adreas!

@liversedge
Copy link
Member

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?

@liversedge
Copy link
Member

Also need to get Andreas on the about box contributors list- this was a fantastic effort !

@amtriathlon
Copy link
Member

amtriathlon commented Jan 13, 2024

Hi Mark, I added Andreas to About Box in 1fb92d1

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.

@liversedge
Copy link
Member

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

@amtriathlon
Copy link
Member

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.

@andreasbuhr
Copy link
Contributor Author

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.
😃

@amtriathlon
Copy link
Member

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
Copy link
Contributor Author

@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.

@amtriathlon
Copy link
Member

amtriathlon commented Jan 15, 2024

Update: Python charts are working when building with Qt 6.2.4 after replacing QRegExp by QRegularExpression in 1f999a3 and 8e2eb3f

@liversedge
Copy link
Member

Nice one, was worried this was going to be much harder !

@andreasbuhr congratulations on your new job - albeit a year late :)

@amtriathlon
Copy link
Member

amtriathlon commented Jan 16, 2024

Update: R Charts are also working when building master with Qt 6.2.4 (95b4a49 and 4b40060)

@amtriathlon
Copy link
Member

amtriathlon commented Jan 16, 2024

Update: CloudDB client code in master is adapted to Qt 6.2.4 too (894eb42, 21faf53, e95608e and c553de5)

@amtriathlon
Copy link
Member

amtriathlon commented Jan 16, 2024

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.

@Joern-R
Copy link
Contributor

Joern-R commented Jan 17, 2024 via email

@liversedge
Copy link
Member

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)

@amtriathlon
Copy link
Member

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.

@amtriathlon
Copy link
Member

amtriathlon commented Jan 17, 2024

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?

@liversedge
Copy link
Member

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

@amtriathlon
Copy link
Member

amtriathlon commented Jan 18, 2024

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 466bdf1, after reversion (42aa241) Python Charts work with GC Charts when building with Qt6

@amtriathlon
Copy link
Member

Update: 2 crashes due to dereferencing the end() iterator were fixed (bf28d73 and 573967f), while these go silent on Qt5 they crash on Qt6.

@amtriathlon
Copy link
Member

amtriathlon commented Jan 18, 2024

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:

if (QString(p.typeName()) == "LTMSettings") {
QByteArray marshall;
QDataStream s(&marshall, QIODevice::WriteOnly);
LTMSettings x = p.read(this).value<LTMSettings>();
s << x;
out<<"\t\t\t\""<<p.name()<<"\":\""<<marshall.toBase64()<<"\",\n";
}

This makes Qt6 builds unusable, except for testing purposes, I couldn't find the cause yet.

@jlaunay
Copy link

jlaunay commented Jan 23, 2024

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.

image

@amtriathlon
Copy link
Member

Main pending issue for me now when building with Qt6 is Metric Trends chart not being correctly saved.

Fixed by 4224fd1, solution was trivial, to find the cause, not so much :(

amtriathlon added a commit that referenced this issue Mar 1, 2024
Related to #3983, see discussion there for the rationale.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QT6 Refactor Updating code to move to QT 6
Projects
Status: In Progress
Development

No branches or pull requests

5 participants