[muscle] Qt & QObject

  • From: "Mika Lindqvist" <linki@xxxxxxx>
  • To: <muscle@xxxxxxxxxxxxx>
  • Date: Wed, 27 Aug 2003 07:04:48 +0300

Just wanted to tell that passing NULL as 'name' parameter isn't quite =
for debugging... Normally in constructor I check against that and force =
to non-NULL. When something goes bad with signals/slots, normally Qt =
print out the "name" parameters of the sender/receiver and if both or =
one of
them are NULL, it's very hard (harder) to track down the error.

if ( !name )
        setName( "My Class Name" );

replace "My Class Name" with QMessageTransceiverThread or
QAcceptSocketsThread or any class that inherits QObject... This isn't to
show up anymore bugs in these two classes but to trap possible errors in
classes that uses these classes (not implying that those classes must =

Other related posts:

  • » [muscle] Qt & QObject