-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Custom code for system tray icons can be dropped #1082
Comments
cc @palinek |
I'd rather we fix our implementation, as Qt's is private and thus we shouldn't rely on it. |
How about using our implementation only in pre-5.6.1 versions ? |
Have a look on the proposal lxqt/lxqt-qtplugin#11 |
I tested, and it makes @mitya57's test case work. Great job. |
@mitya57: out of curiosity, why do you consider it usable only after 5.6.1? |
Because in 5.6.1 I pushed many fixes to the implementation. The most important ones are probably qt/qtbase@9c7f37e and qt/qtbase@a4fac65. There has also been a fix in 5.6.2/5.7 which adds support for multiple tray icons per application. |
@mitya57 How can the default implementation be used by 3rd party platform theme? The QtPlatformTheme privates aren't exported anyhow and the libQtPlatformTheme is built only as a static library. I made a hack for testing in lxqt/lxqt-qtplugin@16f760d, but this surely isn't the way how to include/use the QtPlatformTheme in 3rd party. |
Oh, right, I didn't think about this. Unfortunately there is no public API at the moment, but as you seem to be using private headers in other places anyway, you can try returning We can try making QDBusTrayIcon public, but I don't think it would be easy because it is currently built as part of static Qt5PlatformSupport library, which gets linked in Qt5XcbQpa which doesn't seem to have any public API at the moment. |
@mitya57 We use private headers. But the classes we use are all exported. Edit: typo |
You now have Ubuntu's old platform theme (aka appmenu-qt5) also did that (and it inherited from QGnomeTheme, in a similar way to how you now inherit from QGenericUnixTheme). |
You can't be serious about that ... IMO relying on a completely hidden implementation in
... so our implementation/build will be fragile and can break anytime |
I am not saying that doing that is a good thing, I am just saying that there are no other choices at the moment. I have just sent a mail about possible ways to solve this to the initial author of D-Bus tray implementation (Shawn Rutledge, who is not on GitHub) CCing you all. Hopefully we'll be able to resolve this problem properly on Qt side. |
Bottom line: it's not "custom code", it's our implementation. Qt's implementation is private and thus not usable. If Qt devs decide to make their implementation public and distributions ship it, we'll definitely use it. |
@paulolieuthier I second that. It would be great if Qt devs could make it public. |
LXQt's platform theme currently has some custom code for handling QSystemTrayIcons and converting them into StatusNotifierItems based on libdbusmenu-qt.
However, Qt has a built-in implementation of the same since version 5.5 (however it became actually usable in 5.6.1). So I believe the custom code can be dropped in favour of code in Qt.
Moreover, it appears that the code in LXQt is buggy and can lead to crashes sometimes. A test case is available in QTBUG-54162 (which led me to creating this bug report).
The text was updated successfully, but these errors were encountered: