Expensive QString = ""

Neil Stevens kde-optimize@mail.kde.org
Wed, 12 Mar 2003 03:05:07 -0800


=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday March 12, 2003 02:52, David Faure wrote:
> On Wednesday 12 March 2003 11:08, Neil Stevens wrote:
> > On Tuesday March 11, 2003 05:06, Oswald Buddenhagen wrote:
> > > On Wed, Mar 12, 2003 at 01:18:18AM +0100, Alexander Kellett wrote:
> > > > On Wed, Mar 12, 2003 at 01:02:25AM +0100, Andr? W?bbeking wrote:
> > > > > I don't know, if QString =3D "" appears frequently in time
> > > > > critical code (KHtml, KDE start up, KConfig, ...), but if you
> > > > > really need an empty QString the better solution would be to use
> > > > > a static const QString like QString::null.
> > > >
> > > > just fyi,
> > > > (QString::null).isNull() !=3D QString("").isNull())
> > > > therefore, they can't just be randomly switched over.
> > > > in fact i kind of dislike the use of a null string
> > > > in place of an formally empty string, its just not
> > > > explicit enough for my liking.
> > >
> > > yep. that's why we need QString::empty (or something). i cc'd a mail
> > > about this to ettrich, but got no response so far.
> >
> > QString::isEmpty() already exists.
>
> But not something that _returns_ an empty, non null, string.

Ah, you're right.  I wish this were a newsgroup, and I could cancel the=20
last message. :-)

=2D --=20
Neil Stevens - neil@qualityassistant.com
"The shepherd drives the wolf from the sheep's throat, for which the
sheep thanks the shepherd as a liberator, while the wolf denounces him
for the same act as the destroyer of liberty." -- Abraham Lincoln
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+bxRjf7mnligQOmERAp3aAKCafvU/1Bz4JpbhxEC14OpXJgEA0wCgmU1o
Etcoff6RuHrunWyXypWasDg=3D
=3DDGmZ
=2D----END PGP SIGNATURE-----