-
Notifications
You must be signed in to change notification settings - Fork 257
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
Build with Qt6 #532
Build with Qt6 #532
Conversation
Not sure how to update the CI to use qt6, the qt6 build of lxqt-build-tools and the appropriate python tools for qt6. |
You can ignore it for now. It needs lxqt/lxqt-build-tools#77 to be merged first. |
Builds fine, just those warnings:
|
@doug1234 I took the strain to build konsole Qt6, and they seem to do this properly, I know not how. Since you're working on this, you might have a better idea. On first glance, I noticed that their Would it help to port that code to QTermWidget? |
Those warnings have been there for a long tine. I have a fix at https://github.com/lxqt/qtermwidget/commits/eliminate-warnings/, but I forgot why I didn't push it.
That may help but will likely take much more efforts than porting to Qt 6, and thus it's out of scope for this PR in my opinion. A better place for such discussions can be lxqt/qterminal#320 |
@yan12125 I did have a look at it before I posted here. That thread seems be sleeping since 2018, and was rather unwilling to wake it up - I seriously disliked the direction it was taking. I do have a vested interest in QTermWidget - we have two projects based on it (CoreTerminal and DesQ Term) and would like to keep our projects free from KDE parts. So I am willing to spend some time to port Edit: I will see if I can port it without much efforts. |
@doug1234 Fantastic work...!
I think I fixed this issue. Following are the changes I made:
@yan12125 Looks like porting of PS: @doug1234 I have opened a PR in your repo with these changes. |
Fix issue cursor positioning issues
It looks great now thanks to help from @marcusbritanicus ! The only reason I can see not to merge is documentation since you don't want to update the ci here. I can tweak the documentation if you want but I am going to remove the draft tag now. |
Thank you both for awesome efforts! I should be able to have a look in coming days.
Yes almost. Just need lxqt/lxqt-build-tools#77 and cleanup lxqt/qterminal#1067
That's just a discussion. If there is a need to port Konsole codes in the future, feel free to propose alternative approaches. |
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.
(Only first few files checked)
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.
Second batch. Codes related to KPty and TerminalDisplay are remaining.
I started testing Qt 6 CI in https://github.com/lxqt/qtermwidget/commits/qt6-ci/. The C++ part looks good, while the PyQt part may need some tricks. |
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.
The final batch of reviews! Sorry it takes long with many rounds.
What documentation needs updates? Another question: is this an independent work or based on earlier pull requests in this repo? If the latter, it's better to give credits to authors of other pull requests. |
I definitely looked at the original branch and used it as a starting point for some things. Let me know how you would like me to give credit to the original author. I am willing to do it however you want. |
As far as documentation goes, I think we may need to change references to qt5 to qt6. Not sure if there is anything else or not. I can look into it if you want. |
I bumped the version to 2.0.0. Please give a final review @yan12125 as I think this is looking pretty good now. |
Thanks for the update. I tried non-BMP emoji, emoji flag sequence, and emoji variation selector, and there is no case working in Qt 5 but not in Qt 6. I think the implementation is good enough - will take a look this week. |
That's a Qt6 problem/regression I encountered years ago. It's visible in all Qt6 apps. |
Oh, sorry, I misread your comment! (Read "no case" as "one case".) I meant that there are emojis which are shown correctly in Qt5 apps but not in Qt6 apps. Otherwise, I haven't tried the Qt6-based QTerminal yet. |
Thank you very much for the efforts! I will merge this along with lxqt/qterminal#1067, after cleaning up remaining Qt 5 stuff in the latter.
Well, a case that breaks many Qt apos may be out of scope of this PR |
And that was my point: If there are some emojis that aren't shown correctly in the Qt6 version, the problem might be in Qt6 itself, not in QTerminal. |
Found an issue: after 0f2cbfe, URLs are not underlined when hovered. I suspect changes in Filter.cpp break it, as that class is for filtering specific patterns (ex: URLs) from terminal contents.
@tsujan It seems remaining work may not be trivial. I prefer to postpone Qt 6 port of qtermwidget to the next LXQt release. |
I understand. It could be released whenever it's ready and tested. |
I should be able to take a look early next week. I wouldn't expect the fix to be too difficult. |
Thanks for the kind help. If the URL issue is resolved before LXQt 2.0, it's still good to postpone the Qt 6 version, as overall changes in this PR are non-trivial and require intensive testing. |
OK. I am pretty sure I already see the mistake that caused this. It should be a super quick fix. But schedule the release for whenever you think is best. |
No need to worry about the release date. We could release the port whenever it's thoroughly tested. I added a note to the draft of the release announcement of LXQt 2.0.0:. Check if it's good enough: "QTerminal is the only app whose Qt6 port will be released separately -- complications were encountered due to the removal of legacy encodings from Qt6. Until then, its Qt5 version 1.4.0 could be used." |
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.
GTM.
Should land on master ASAP.
Any issues can be address there,
@doug1234 Nice work.
Anchored pattern was not necessary for urls. Removing that got URLs working as they do in qt5. |
Thanks! I will test again and finish cleaning up the qterminal PR these two days, and then both can be merged. If you wish, you can do a rebase and cleanup some commits (ex: previous attempts for Qt6 compatibility). It's also fine to skip further cleanups - I will merge all commits as-is. |
Great! I think I am going to leave it as is unless you find something else. |
Here we go 🎉 |
I'm unsure on how to get the QTermWidget bindings from PyQt6 to build. With both |
@marcusbritanicus: Thanks, that got me further, but still no complete success:
|
@isf63 Right. I tried to compile on a fresh setup. I too hit this error. The simplest solution is to install the C++ library first. Then you can compile and install the pyqt bindings. How this works on the ci I am not sure. |
while( ((right.x()<_usedColumns-1) || (right.y()<_usedLines-1 && (_lineProperties[right.y()] & LINE_WRAPPED) )) | ||
&& charClass(_image[i+1].character) == selClass ) | ||
&& charClass(QChar(static_cast<ushort>(_image[i-1].character))) == selClass ) |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
setCodec(LocaleCodec); | ||
|
||
delete _decoder; | ||
_decoder = _codec->makeDecoder(); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
https://doc.qt.io/qt-6/qstringencoder.html → "The encoder remembers any state that is required between calls,..."
Builds and the example runs with qt 6.6.0 on rhel9 with no new warnings. Currently using the qt5 compatibility library as was suggested in other pull requests.
Issue: The cursor is drawn farther to the right then it should be. This was not an issue for me with qt5. Looing into.
Issue: Text is sized differently when selected. This makes an odd effect. This was not an issue for me with qt5.
TODO: Update documentation.