[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta-devel
Subject:    Re: [quanta-devel] Fwd: [Bug 106034] New: Quanta: SVN TRUNK some
From:       Andras Mantia <amantia () kde ! org>
Date:       2005-05-23 18:02:47
Message-ID: 200505232102.52234.amantia () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 23 May 2005 18:19, Paulo Moura Guedes wrote:
> On Monday 23 May 2005 16:02, Jens Herden wrote:
> > On Monday 23 May 2005 21:08, Paulo Moura Guedes wrote:
> > > On Friday 20 May 2005 19:57, Andras Mantia wrote:
> > > > Paulo,
> > > >
> > > >  please, please DO NOT USE "assert" in Quanta!
> > >
> > > You know i have a diferent view but ok, you are the boss :)
> > >
> > > What I don't understand is why your request is related to this
> > > bug. An include was missing...
> >
> > Wasn't the include assert.h ? Why would one miss this include?
>
> Andras doesn't like std::assert because it crashes the application
> (although one can use NDEBUG).

Right and because of the bug I posted. I suppose it compiled for you 
without the include, but does not compile of others. This is why it is 
better to avoid STD and other things not supported on every 
platform/compiler. What is good about Q_ASSERT and Qt is that it is 
guaranteed to work on all supported platforms under the same condition 
(unless it is documented otherwise, but the exceptions are for 
Windows).

> But in this case, an include was 
> missing. If one use Q_ASSERT and doesn't #include <qapplication.h>,
> it will have the same problem :) It is not "assert" specific.

Ok, so I can guess two things:
- you committed untested /not compiled code, which is not good
- you compiled, committed but it still misses the include, which proves 
what I said above.

> I don't know why but I can always compile without #include <cassert>,
> so I keep forgetting :)

Because you have a different compiler. Even g++ != g++ as distributions 
tend to backport patches from g++ CVS HEAD and not always the same one.

And of course, crashing the application is not nice. If you really want 
to use assert, I also request to add -DNDEBUG or whatever to the 
Makefile.am. You can enable the crash for yourself. ;-)

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org

[Attachment #5 (application/pgp-signature)]

_______________________________________________
quanta-devel mailing list
quanta-devel@kde.org
https://mail.kde.org/mailman/listinfo/quanta-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic