Expensive QString = ""

Neil Stevens kde-optimize@mail.kde.org
Wed, 12 Mar 2003 02:08:29 -0800


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

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.

=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+bwcjf7mnligQOmERAtndAJ9Il0dKQTfWis8TxFy9B+8yWEN7DACeMoge
r30kGnNJxl1hL928vAQGLx0=3D
=3D4/nP
=2D----END PGP SIGNATURE-----