[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: getting char data out of QStrings in Qt 2.0
From: David Faure <faure () alpha ! tat ! physik ! uni-tuebingen ! de>
Date: 1999-04-30 11:33:26
[Download RAW message or body]
On Sat, May 01, 1999 at 12:23:21AM +0000, Mosfet wrote:
> I actually kind of like the cast but looking at other people's work I seem to
> be the only one ;-)
>
> I'll change my stuff accordingly.
>
I like the cast too, because it allows to change the variable to a char *
without changing the method calls. And when using an API (kdelibs), you
don't have to worry about whether the member is a char * or a QString -
take KURL, for example, all char * are QStrings now, so the cast (ofter
implicit) is used very often.
But I agree that in general, casts are not a good thing.
> > pbrown@redhat.com wrote:
> > >
> > > Is the preferred method for getting data out of QStrings and into char
> > > arrays in Qt 2.0 via the ::ascii() method or with a (const char *) cast?
> > > And why?
> > >
> > casts are never the prefered way when there is another one.
> >
> > Greetings, Stephan
> >
> > --
> > As long as Linux remains a religion of freeware fanatics,
> > Microsoft have nothing to worry about.
> > By Michael Surkan, PC Week Online
>
--
David FAURE
david.faure@insa-lyon.fr, faure@kde.org
http://www.insa-lyon.fr/People/AEDI/dfaure/index.html
KDE, Making The Future of Computing Available Today
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic