Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917071 - dev-qt/qtwidgets:5 will need several backports from qtbase-6 to get proper GTK theming support on Gnome
Summary: dev-qt/qtwidgets:5 will need several backports from qtbase-6 to get proper GT...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-09 10:38 UTC by Pacho Ramos
Modified: 2023-11-24 14:20 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2023-11-09 10:38:42 UTC
Hello,

With the recent deprecation of QGnomePlatform, I ended up with a semibroken theming on gnome for QT apps. 

The situation is well summarized at:
https://jgrulich.cz/2023/08/22/qt-theming-in-fedora-workstation/
https://fedoraproject.org/wiki/Changes/NoCustomQtThemingForWorkstation
https://bugzilla.redhat.com/show_bug.cgi?id=2233235

For now qgnomeplatform still works on Gnome, even if it's likely to become more broken in the future. 

The problem is that it seems that the needed backports for upstream gtk3 widgets are not going to land to official 5.11 branch or, at least, it seems nothing has landed on that branch since June... but I am not familiar with QT upstream workflow :/ and I couldn't find anything in upstream side for qt5 (qt6 should be ok now)

Those are the following:
https://src.fedoraproject.org/rpms/qt5-qtbase/blob/rawhide/f/qt5-qtbase.spec#_168

I am not sure if we could carry them... or if you are in touch with someone in upstream side to see if they could land on an hypothetical qtbase-5.15.12, that would benefit all the distributions too (as I don't think qt5 apps are going to disappear soon).

Thanks a lot for your help
Comment 1 Ionen Wolkens gentoo-dev 2023-11-09 14:23:56 UTC
Qt5 is actually on version 5.15.15 or so currently, but this is only offered to commercial customers. Won't be seeing the latest changes on their repos either, it's possible these backports are already in one of these versions but hard to tell.

Slowly they give us an old version so bumps still happen.

If want to upstream these backports, better to try another upstream:
https://invent.kde.org/qt/qt/qtbase/-/merge_requests

Which would end up in ::gentoo as well given we carry their changes (see qtbase-5.15.11-gentoo-kde-1.tar.xz)

asturm is more familiar with this than me though, has sent tons there -- I mostly only handle qt6 myself.
Comment 2 Ionen Wolkens gentoo-dev 2023-11-09 14:44:43 UTC
(In reply to Ionen Wolkens from comment #1)
> If want to upstream these backports, better to try another upstream:
> https://invent.kde.org/qt/qt/qtbase/-/merge_requests
...then again, given this is theming for gnome, I guess KDE wouldn't be too interested
Comment 3 Ionen Wolkens gentoo-dev 2023-11-09 14:47:29 UTC
(In reply to Ionen Wolkens from comment #2)
> (In reply to Ionen Wolkens from comment #1)
> > If want to upstream these backports, better to try another upstream:
> > https://invent.kde.org/qt/qt/qtbase/-/merge_requests
> ...then again, given this is theming for gnome, I guess KDE wouldn't be too
> interested
(I'll leave it up to asturm wether want to carry these downstream or not anyhow, no strong opinion myself)
Comment 4 Andreas Sturmlechner gentoo-dev 2023-11-12 10:34:51 UTC
The good news is that the linked Fedora package is using Qt5PatchCollection, so the best thing would be to get them devs to upstream their patches to KDE. Because that's what you would do, no?

Since it affects how Qt/KDE applications would look in Gnome, I don't think it is strictly out of scope of Qt5PatchCollection.
Comment 5 Pacho Ramos gentoo-dev 2023-11-12 10:52:42 UTC
Thanks, I have just contacted the author of the patches to know if he already tried to upstream them and to which upstream.
Comment 6 Andreas Sturmlechner gentoo-dev 2023-11-18 12:27:43 UTC
(In reply to Pacho Ramos from comment #5)
> Thanks, I have just contacted the author of the patches to know if he
> already tried to upstream them and to which upstream.
They are declared "Qt 6 backports" so presumably all of them are already in upstream Qt 6. That is a major prerequisite for cherry-picking them to Qt5PatchCollection. Unfortunately, they didn't use "cherry-pick -x" for their patches and their patch header commit hashes do not come from upstream Qt repositories, but grep'ing for a few git summaries reveals:

"0002-Add-enum..." dev branch: c8cf0f17b80b143f3543067a82c1aa29f0e4e386
"0003-Sync-and..." dev branch: 2f4204238c7ec6f52b688268b6d3b4b937630074
"0004-QGtk3Theme." dev branch: f832c707caaa24528eb3048280576144eb13cda4

... and so on.
Comment 7 Pacho Ramos gentoo-dev 2023-11-24 14:20:58 UTC
Hello,

I finally was able to review my old mails, sorry for the delay :S

Jan Grulich kindly replied to me that he backported the stuff from qt6 trying to not break API/ABI. He didn't try to get them accepted upstream as he is unsure if they would be accepted: they are many, and he needed to introduce a new class QFlatMap. 

He thinks we can easily apply them to our packages as QGtkStyle won't be changed anymore for qt-5.15 and, if that would happen, they will update the patches accordingly for Fedora.