[Development] New feature to qstring | QString::toBool()

Thiago Macieira thiago at kde.org
Wed Oct 26 11:18:10 CEST 2011

On Wednesday, 26 de October de 2011 07.15.59, jan-arve.saether at nokia.com 
> bool parseOk;
> if (!str.toBool(&parseOk)) {
>    if (parseOk)
>        disableSuperFastRenderer();
> }

bool parseOk
if (!str.toBool(&parseOk) && parseOk)

Or you can accept that, if the user types crap instead of "false", it's false.

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20111026/8dfcef7b/attachment.sig>

More information about the Development mailing list