Summary: | Qt4 applications use wrong palette and icons w/ Breeze | ||
---|---|---|---|
Product: | [Plasma] Breeze | Reporter: | Matthias Dahl <ua_bugz_kde> |
Component: | general | Assignee: | Plasma Development Mailing List <plasma-devel> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | mklapetek, rdieter, wengxt |
Priority: | NOR | ||
Version: | 5.3.0 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
qtconfig w/ KDE_SESSION_VERSION=4
qtconfig w/ KDE_SESSION_VERSION=5 vlc main window w/ KDE_SESSION_VERSION=4 vlc main window w/ KDE_SESSION_VERSION=5 vlc file dialog w/ KDE_SESSION_VERSION=4 vlc file dialog w/ KDE_SESSION_VERSION=5 |
Description
Matthias Dahl
2015-05-11 08:06:13 UTC
Created attachment 92533 [details]
qtconfig w/ KDE_SESSION_VERSION=4
Created attachment 92534 [details]
qtconfig w/ KDE_SESSION_VERSION=5
Created attachment 92535 [details]
vlc main window w/ KDE_SESSION_VERSION=4
Created attachment 92536 [details]
vlc main window w/ KDE_SESSION_VERSION=5
Created attachment 92537 [details]
vlc file dialog w/ KDE_SESSION_VERSION=4
Created attachment 92538 [details]
vlc file dialog w/ KDE_SESSION_VERSION=5
To clarify: All screenshots were taken in a KDE 5.3.0 session naturally. I simply set KDE_SESSION_VERSION for the specific application to 4 or 5 -- and not globally. :-) Further investigation revealed the following: 1) If KDE_SESSION_VERSION=5, kdeglobals is first searched for in "~/.kde/" while with KDE_SESSION_VERSION=4 it is "~/.kde4/". This comes as a surprise since kdelibs is configured properly with kde4 and kcoreaddons with prefix "4". And since KShareConfig and alike use KStandardDirs (which should all be ".kde4"), I don't see where the ".kde" comes from at all. The environment is clean as well, no KDEHOME or alike is set. 2) Setting a symlink .kde -> .kde4 works around the problem and no matter what KDE_SESSION_VERSION (4 or 5), Qt4 apps show properly. 3) The color that doesn't get picked up when not everything is properly in place is "BackgroundNormal" from the "Colors:Selection" section of kdeglobals. 4) I filed a bug downstream with Gentoo as well (https://bugs.gentoo.org/show_bug.cgi?id=549824), since this might very well be a packaging bug (or perhaps partly) since I am not able to reproduce this on either OpenSuSE Tumbleweed nor Kubuntu. Nevertheless, any help on this matter would be greatly appreciated since I have spent countless hours trying to hunt this problem down and I am still at it, unfortunately. :( I forgot to mention in (1): Setting KDE_SESSION_VERSION to either 4 or 5 only influences whether ".kde4" or ".kde" is first searched, but after that, ".kde4" is always searched as well. So setting K_S_V to 5 does not result in ".kde" exclusively being searched at all... it is just searched first while with 4 it is not searched at all ever. Turns out it was a packaging error after all: The gui platform plugin for Qt4 ("qguiplatformplugin_kde") was not being pulled in/installed and thus causing all the described trouble. Sorry for all the unnecessary fuss here but tracking this down was really painful and time-consuming -- and I only came to realize what was causing it after investigating it through good-old fashioned gdb. :) Hey nice investigation! Thanks for the details, might come handy sometime :) Just so we could consider giving a heads-up to other packagers, when you say "The gui platform plugin for Qt4 ("qguiplatformplugin_kde") was not being pulled in/installed", what is that exactly and where is does it come from? I'm asking mostly, because the other gui platform plugin for Qt4 I've ever seen, is the one that comes from kde-workspace-4.11.x On Chakra, we just build it from kde-workspace and make it a separate package called kde4-integration. And it seems that this plugin only depends on kdelibs4. Sorry for not answering sooner but honestly I simply forgot. :-( (In reply to Martin Klapetek from comment #11) > Hey nice investigation! > > Thanks for the details, might come handy sometime :) Glad I was of help. :) And that gave me a nice excuse to finally do some C++ stuff again (nowadays you simply don't get much freelance work related to C++ which is super sad) and dive deep into how to debug Qt w/ naked gdb. ;-) (In reply to Rex Dieter from comment #12) > I'm asking mostly, because the other gui platform plugin for Qt4 I've ever > seen, is the one that comes from kde-workspace-4.11.x That's exactly where it comes from like Weng Xuetian already stated above. If that one is missing, you only have Qt's own internal logic which is not too sophisticated, e.g.: http://code.qt.io/cgit/qt/qt.git/tree/src/gui/kernel/qkde.cpp#n59 That's pretty much why w/o the plugin, Qt is looking in ".kde" for kdeglobals if KDE_SESSION_VERSION is anything other than 4. To make a long story short: If you want Qt 4 apps to integrate well into KDE 5, you will need that plugin installed which in-turn depends on kdelibs4. Otherwise you are asking for trouble -- one way or the other. :-) |