[Qt-interest] checking the return value of connect

Atlant Schmidt aschmidt at dekaresearch.com
Fri Jul 8 21:12:59 CEST 2011


Folks:

  Yes, thanks for catching that; we do our Release builds
  with ASSERT()s still in-place and I sometimes forget about
  the rest of the world ;-).

  But to address the problem of the inner content of ASSERT()
  not always being compiled-in, I'm told that in the Microsoft
  VC++ world, there's a related macro that compiles to ASSERT(...)
  in debug/engineering builds and to just ... (or (...)?) in
  Release builds. I'm sorry but I don't recall its name. That
  macro would always be safe to use in the way I was showing.

                                 Atlant

-----Original Message-----
From: qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [mailto:qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com] On Behalf Of Constantin Makshin
Sent: Friday, July 08, 2011 11:47
To: Qt Interest
Subject: Re: [Qt-interest] checking the return value of connect

The problem is that ASSERT() statements are [usually] removed from release builds. :)

On Friday, July 08, 2011 07:32:49 PM Atlant Schmidt wrote:
> Mandeep:
>
>   If connect() fails, you might want to ASSERT(); we do.
>   So ASSERT( connect( ... ) );
>
>                            Atlant
>
> -----Original Message-----
> From: qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [mailto:qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com] On Behalf Of Mandeep Sandhu
> Sent: Friday, July 08, 2011 09:46
> To: Thiago Macieira
> Cc: qt-interest at qt.nokia.com
> Subject: Re: [Qt-interest] checking the return value of connect
>
> > Considering QObject::connect prints a warning when it can't connect, why were
> > you spending time searching for the problem before fixing the warning?
>
> Because of the verbosity of my logs! :) It got lost in the storm of
> logs generated (it was running on an embedded box and there was no
> color support for different log levels).
>
> -mandeep

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.



More information about the Qt-interest-old mailing list