[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: inefficient QString coding practice
From: Eva Brucherseifer <eva () kde ! org>
Date: 2004-03-13 15:51:28
Message-ID: 200403131651.28377.eva () kde ! org
[Download RAW message or body]
On Saturday 13 March 2004 14:38, Thiago Macieira wrote:
> Dr. Juergen Pfennig wrote:
> >If we look into QT's source code, we find that QT would handle
> >
> > if( extension == ".wav")
> > ...
> >
> >much more efficient, because it has an overloaded == operator for
> > "const char*". Here is the source from qstring.cpp:
>
> Only if QT_NO_CAST_ASCII isn't given. If it is given, then all the
> implicit const char* to QString conversions are withheld.
Ther is no implicit cast involved. You have a member function available for
exactly the parameters given. So no cast here and there shouldn't be any
problem with the QT_NO_CAST_ASCII flag at all.
The questions is rather: Is this member function available in all supported Qt
versions? If so it should be no problem to change all code to use the compare
operator.
Greetings,
eva
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic