change bool to enum : KUrl

Thiago Macieira thiago at kde.org
Tue May 2 08:13:44 BST 2006


Olivier Goffart wrote:
>> 2) Don't set the default value to 0. Set to a named value.
>
>Why ?  (for my information)

So that we can understand what the default is by looking at the API docs.

The example is the Qt documentation:
http://doc.trolltech.com/4.1/qstring.html#split

Can you tell me what the defaults are in this function? Is it case 
sensitive?
QStringList QString::split ( const QString & sep, SplitBehavior behavior = 
0, Qt::CaseSensitivity cs = 0 ) const

If it were so, you'd have to read the documentation for SplitBehavior and 
Qt::CaseSensitivity to understand what the default is -- and by 
exclusion!

Thankfully, it's
QStringList QString::split ( const QString & sep, SplitBehavior behavior = 
KeepEmptyParts, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const

-- 
Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
  thiago.macieira (AT) trolltech.com     Trolltech AS
    GPG: 0x6EF45358                   |  Sandakerveien 116,
    E067 918B B660 DBD1 105C          |  NO-0402
    966C 33F5 F005 6EF4 5358          |  Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060502/8d2b8eaf/attachment.sig>


More information about the kde-core-devel mailing list