[Interest] qmenu regression?

Boudewijn Rempt boud at valdyas.org
Thu Apr 14 20:36:30 CEST 2016

I got this bug report


And sure enough, when I tested it, the reporter was right. The 
context menu actions weren't triggered. I checked, and this worked
with Qt 5.4, but no longer with 5.5 or 5.6.

This is the code:

     QMenu menu(this);
     QAction* action = menu.addAction(d->detached ? i18n("Attach to Toolbar") : i18n("Detach from Toolbar"));
     connect(action, SIGNAL(triggered()), this, SLOT(switchDetached()));

And the switchDetached() slot isn't called anymore. Has our code
always been wrong, or is this a real regression in Qt?

Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org

More information about the Interest mailing list