[Interest] Problem about signals/slots in Qt 5
thiago.macieira at intel.com
Tue Sep 18 15:07:58 CEST 2012
On terça-feira, 18 de setembro de 2012 13.47.57, Sean Harmer wrote:
> > I like this new syntax much better since it finds signal/slot mismatches
> > at compile time. I used to miss the connection mismatch messages in the
> > sea of my REALLY chatty logs. And pulling my hairs wondering why
> > something doesn't work. :)
> Run your application with the environment variable QT_FATAL_WARNINGS
> defined. Then the application will break when a connect fails or anything
> else prints out a qWarning().
I was about to suggest that, but there are two drawbacks with this solution:
1) it only aborts if the connect was executed in the first place. If the
application isn't sufficiently tested, the bug might linger for a long time,
even to a release, because that code path has never got executed.
2) it assumes that people aren't using qWarnings for non-problems. KDE
applications used to do that a lot, until I changed kWarning to be Debug
level, instead of Warning level.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the Interest