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

Qt6 port #628

Open
1 of 3 tasks
marc-sturm opened this issue Jan 30, 2025 · 5 comments
Open
1 of 3 tasks

Qt6 port #628

marc-sturm opened this issue Jan 30, 2025 · 5 comments
Assignees

Comments

@marc-sturm
Copy link
Member

marc-sturm commented Jan 30, 2025

Qt5 no longer has support.
We need to update

literature:

It was assumed that XMLPatterns module (deprecated in Qt 6) will be later reintroduced.
In version 6.8 the module is still missing:
https://doc.qt.io/qt-6/qtmodules.html

Only XML module is there

@marc-sturm marc-sturm self-assigned this Jan 30, 2025
@ubuntolog ubuntolog self-assigned this Feb 13, 2025
@ubuntolog
Copy link
Collaborator

I am working on this branch at the moment qt6_switch

@ubuntolog
Copy link
Collaborator

The branch compiles with Qt 5.15 and does not show any warnings now. Unfortunately, I could not compile it with Qt 6. Entire modules have been removed: e.g. xmlpatterns

@ubuntolog
Copy link
Collaborator

The new branch cannot be compiled with Qt 5.12: I am getting an error "endl is not a member of Qt"

@ubuntolog
Copy link
Collaborator

ubuntolog commented Feb 20, 2025

The master branch now includes the code compatible with qt 5.15 and when compiling with qt 5.15 no warnings will be displayed. For the switch to Qt 6 the following things have to be considered:

  • Removal of xmlpatterns module and its replacement with a third-party library (possibly libxml2)
  • The remaining expressions using QRegExp need to be replaced with QRegularExpression, exactMatch method was removed, use match and hasMatch with some modifitions
  • QT_CHARTS_USE_NAMESPACE replaced by a regular import QtCharts/QChartView
  • QGridLayout::setMargin replaced by setContentsMargins
  • QTextStream::setCodec("UTF-8") replaced by QTextCodec::codecForName("UTF-8");
  • count() and size() method return new types, which causes problems in std::max statements, static_cast is not a good option
  • QSvgRenderer replaced by QtSvg/QSvgRenderer and QPainter, adjust and test SVG rendering
  • QT += network is needed for almost every project file

Without the above mentioned changes the code cannot be compiled with Qt 6. There will be around 300 warnings after that, and they have to be addressed.

@ubuntolog
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants