RFC: bool operators for some classes

David Faure dfaure at klaralvdalens-datakonsult.se
Fri Jan 3 08:42:43 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 03 January 2003 02:04, Malte Starostik wrote:
> Some candidates apart from KMFI would be:
> KSaveFile (status() != 0)
> KTempFile (status() != 0)
> KURL (isValid())
> KURL::List (!isEmpty())
> KColor (isValid())
> KArchive (isOpened())
> DCOPRef (!isNull())
> KABC::(anything that has an isEmpty() member) (!isEmpty())
> maybe some others

Sounds like a good opportunity to write code with mistakes.
Guess why QString doesn't have such an operator?
Also ... should the KURL bool conversion be isValid or isEmpty? ....
Code with "hidden meaning" is never easy to debug.

- -- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Klarälvdalens Datakonsult AB, Platform-independent software solutions
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2.1 is available - http://download.kde.org/stable/koffice-1.2.1/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+FU0D72KcVAmwbhARAk7GAJ9vLw7Hfn2rZtieIww+l0T+Y5P31QCfZTE1
0QItDiSlRahb8NHJI/GCX7s=
=f3a6
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list