Expensive QString = ""

David Faure kde-optimize@mail.kde.org
Wed, 12 Mar 2003 11:52:16 +0100


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

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.
>=20
> QString::isEmpty() already exists.

But not something that _returns_ an empty, non null, string.=20

=2D --=20
David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klar=C3=A4lvdalens Datakonsult AB, Platform-independent software solutions
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+bxFg72KcVAmwbhARAjUbAKCN28ijYwkAZa7AFDpPtCuayrSYVwCffBvD
eYW0D1DD0Uw1Iat+brOps3I=3D
=3DFNaP
=2D----END PGP SIGNATURE-----