[Qt-interest] customised signals and slots in qt

Malyushytsky, Alex alex at wai.com
Fri Jul 8 19:15:36 CEST 2011


>>That's not necessary.  When a connect fails, an error message is printed
on stderr anyway.

But is very convenient, when error message is printed in VC it is easy to miss the message unless you closely watch the loading process.
with Q_ASSERT you don't.

Alex


-----Original Message-----
From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Nikos Chantziaras
Sent: Friday, July 08, 2011 12:53 AM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] customised signals and slots in qt

On 07/08/2011 05:10 AM, Bill Crocker wrote:
>
>>>
>>> Connect(object_a, SIGNAL( signal1()),object_b, SLOT(slot1()));
>>
>> That should be:
>>
>> connect(object_a, SIGNAL(signal1()), object_b, SLOT(slot1()));
>>
>
> No, that should be:
>
> if( !connect(object_a, SIGNAL(signal1()), object_b, SLOT(slot1())) )
> Q_ASSERT(false);

That's not necessary.  When a connect fails, an error message is printed
on stderr anyway.
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest


---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”

“Please consider our environment before printing this email.”


More information about the Qt-interest-old mailing list