← Back to team overview

dx-packages team mailing list archive

[Bug 1574699] Re: All QSystemTrayIcon have the same icon, and QSystemTrayIcon::isSystemTrayAvailable remove all QSystemTrayIcon

 

Hello ogoffart, or anyone else affected,

Accepted appmenu-qt5 into xenial-proposed. The package will build now
and be available at https://launchpad.net/ubuntu/+source/appmenu-
qt5/0.3.0+16.04.20151130-0ubuntu2 in a few hours, and then in the
-proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed.  Your feedback will aid us getting this update
out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, and change the tag
from verification-needed to verification-done. If it does not fix the
bug for you, please add a comment stating that, and change the tag to
verification-failed.  In either case, details of your testing will help
us make a better decision.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance!

** Changed in: appmenu-qt5 (Ubuntu Xenial)
       Status: In Progress => Fix Committed

** Tags added: verification-needed

-- 
You received this bug notification because you are a member of DX
Packages, which is subscribed to appmenu-qt5 in Ubuntu.
https://bugs.launchpad.net/bugs/1574699

Title:
  All QSystemTrayIcon have the same icon, and
  QSystemTrayIcon::isSystemTrayAvailable remove all QSystemTrayIcon

Status in appmenu-qt5:
  New
Status in appmenu-qt5 package in Ubuntu:
  Fix Released
Status in appmenu-qt5 source package in Xenial:
  Fix Committed

Bug description:
  # Impact
  This affects all Qt applications that use QSystemTrayIcon::​isSystemTrayAvailable, in Unity environment. Confirmed examples are owncloud-client and keepassxc, but there may be more applications.

  # Test Case
  See the original description below for the test case in C++.

  # Proposed Fix
  The proposed fix is identical to what was uploaded to Yakkety as version 0.3.0+16.10.20160628.1-0ubuntu1. The fix is using unique connections for all AppMenuPlatformSystemTrayIcon instances.

  # Regression Potential
  The fix is in Yakkety since June and in Zesty, and nobody complained so far. So it should not cause any regressions.

  -----------------------------------------------------------------------------
  in appmenu-qt5 in ubuntu 16.04, the  AppMenuPlatformSystemTrayIcon assumes there is only one instance of a QPlatformSystemTrayIcon: it register the same dbus name for all the instances.  In fact, there is one instance of QPlatformSystemTrayIcon per instance of QSystemTrayIcon,  and one temporary is created for QSystemTrayIcon::isSystemTrayAvailable.

  This breaks the owncloud client  [issue
  https://github.com/owncloud/client/issues/4693 ]

  This example reproduces the problem:

  ```
  #include <QtWidgets>

  int main(int argc, char *argv[])
  {
      QApplication a(argc, argv);
      QImage img(64,64, QImage::Format_ARGB32);
      img.fill(Qt::red);
      QSystemTrayIcon sti(QIcon(QPixmap::fromImage(img)));
      sti.show();

       QSystemTrayIcon::isSystemTrayAvailable(); // with this line, the QSystemTrayIcon does not appear
       // comment the previous line to see that the QSystemTrayIcon works and that there is a bug in that line

      return a.exec();
  }
  ```

  This testcase shows that the
  AppMenuPlatformSystemTrayIcon::~AppMenuPlatformSystemTrayIcon  called
  by the temporary object created inside
  QSystemTrayIcon::isSystemTrayAvailable unregisters the icon.

To manage notifications about this bug go to:
https://bugs.launchpad.net/appmenu-qt5/+bug/1574699/+subscriptions