[Interest] qmenu regression?

Scott Aron Bloom scott at towel42.com
Thu Apr 14 21:26:29 CEST 2016

I have always used 
connect( action, SIGNAL( triggered( bool ) )

You may want to try that, it could be something changed in the connect macro, when the signal has a default for the parameter...


-----Original Message-----
From: Interest [mailto:interest-bounces+scott.bloom=onshorecs.com at qt-project.org] On Behalf Of Boudewijn Rempt
Sent: Thursday, April 14, 2016 11:37 AM
To: interest at qt-project.org
Subject: [Interest] qmenu regression?

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 _______________________________________________
Interest mailing list
Interest at qt-project.org

More information about the Interest mailing list