[Qgis-developer] Using the Qt*_debug Libraries to Find Bad Qt
Connections
Tom Elwertowski
telwertowski at comcast.net
Thu Mar 30 01:37:37 EST 2006
Hello all,
I have recently started using the Qt*_debug libraries. One of the things
these libraries do is report bad connections at runtime. We have several
connections where either the signal or slot isn't defined and the
regular libraries don't report this. connect() does return a bool but we
don't check it.
In order not to confuse readers of our code, we should use the debug
libraries to monitor connections and either remove one-sided connections
or else add empty functions on the other side with NYI comments.
On a Mac, the debug libraries can be activated by defining:
export DYLD_IMAGE_SUFFIX=_debug
This has no effect on Ubuntu so I modified line 383 of my working copy
of acinclude.m4 to be:
QT_LIB="-lQtCore_debug -lQt3Support_debug -lQtGui_debug
-lQtNetwork_debug -lQtSvg_debug"
If there isn't an automatic way to do this on Linux, perhaps we should
add a --enable-qtdebug option to configure.
Qt/Mac 4.1.1 warning and workaround:
Don't use the suffix _debug. Setting this suffix will load all debug
libraries, not just the Qt debug libraries. There are problems in the Qt
4.1.1 libraries which trigger fatal assertions in the Mac OS debug
libraries.
Instead, do for each Qt library:
ln -s QtCore_debug $QTDIR/QtCore.framework/Versions/4.0/QtCore_debugqt
Then do:
export DYLD_IMAGE_SUFFIX=_debugqt
This workaround will load the Qt debug libraries without loading the Mac
OS debug libraries.
Tom
More information about the Qgis-developer
mailing list