-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
More QT6 compatibility changes #2662
Conversation
Qt6 moved some of the functionality to separate modules.
2231d59
to
d20ae67
Compare
* Crash caused by list varibles getting initialized after the models using them. Previously Qt didn't try to access them so early. Move them to the models as there is no need to share them betwen view and models. * Fix empty color list by using begin/endResetModel instead of dataChanged to signal changes in data.
* use typedef for floating point value used in color related API * changes in screen grabbing API used by color picker
* Some of the API replaced int with QKeyCombination, use typedef in cutter code * Use of + operator depracted, replace with recommended "|" operator * QMouseEvent globalPos and localPos renamed to globalPosition and position, replace with helper function or use of integer position which wasn't renamed.
Just noticed one more crash. |
Qt doesn't have native language name for some of them. Trying to capitalize it caused crash. Use `QLocale(QString)` constructor instead of manually looping and comparing. The old code incorrectly matched "tr" as "trv". Don't try to capitalize language name: * In many cases Qt already returns it capitalized * capitalization doesn't make sense for some scripts * in general case splitting first "character" is a hard problem * in some languages even with latin based scripts name of language isn't a proper noun which needs to be capitalized
I wonder if it's possible to ship Qt6-based build for Windows also? |
Yes we will eventually ship QT6 based Cutter for all platforms, but it's too early for that. Is there a specific reason you are interested in VS2019? |
@karliss yes, they recently made ASAN available:
It might be helpful to provide ASAN-enabled builds for better pre-release testing on Windows |
Does this mean that the next Cutter won't come with KSYNTAXHIGHLIGHTING? |
KSyntaxHighlight gained Qt6 support only recently, probably it will take time to propagate in distributions: https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/184 |
No one is switching to QT6 yet. It isn't ready yet. This PR is in 2.0.2 because some of the changes that are in Qt6 are also included in KDE Qt 5.15 patches. Even once the QT6 support will be finished it doesn't mean removing compatibility with with QT5. We will switch the official release builds once we feel comfortable with it and distro maintainers will be able to switch at their pace based on readiness of other packages. By the way current official release builds do not include KSyntaxHighlight either only some of distro specific builds do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran through the test plan with unpatched Qt 5.15.2 locally, and changes look good.
Your checklist for this pull request
Detailed description
For now should build in minimal config
-DCUTTER_QT6=ON -DCUTTER_ENABLE_PYTHON=OFF -DCUTTER_ENABLE_PYTHON_BINDINGS=OFF -DCUTTER_ENABLE_KSYNTAXHIGHLIGHTING=OFF
It's necessary to manually disable CUTTER_ENABLE_KSYNTAXHIGHLIGHTING because otherwise it might find the QT5 version of it and then complain that it's incompatible with rest of QT libs which are QT6.
Test plan (required)
Closing issues
Related #2464