[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Some thoughts on kdelibs et al.
From: Harri Porten <porten () trolltech ! com>
Date: 2001-09-27 12:05:45
[Download RAW message or body]
On Wed, 26 Sep 2001, Marc Mutz wrote:
> Apropos casts: Any style guide suggesting to use the advanced xxx_casts
> for all clas-related stuff? Ie:
>
> QLineEdit *le dynamic_cast<QLineEdit*>(combobox->children()->first());
> Q_ASSERT( le );
> le->selectAll();
As dynamic_cast has some overhead I'd only used when really needed (i.e.
you are uncertain about the type).
> Instead? And while we're at it: What about using the C++ header files
> instead of the C ones?
>
> #include <cassert>
> #include <iostream>
> - -vs-
> #include <assert.h>
> #include <iostream.h>
Check the mailing list archives to see that is not portable (yet).
> And... Using Q_ASSERT everywhere instead of assert and defining
> - -DQT_FATAL_ASSERT in the Makefiles?
Why not use assert() right away then ? After all Q_ASSERT() is internal
API (which those porting from Qt 2.x will have noticed;)
Harri.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic