On 8/23/12 5:21pm, Samuel Gaist wrote:
> Hi,
>
> Looks like your on mac, trying on mine I get this at compilation time:
>
> warning: cannot pass objects of non-POD type 'class QBool' through '...'; 
> call will abort at runtime
>
> Here is the why of your crash
>
> Hope it helps


Samuel, it help, actually!

First, after changing the offending line to the following, it works as 
expected:

        qWarning("Contains [first]: %d", s.childGroups().contains("first") == 
true);


But the real problem is this: why is the documentation referring to 
bool, and not to QBool?

        http://qt-project.org/doc/qt-4.8/qstringlist.html#contains

        bool QStringList::contains ( const QString & str, Qt::CaseSensitivity 
cs = Qt::CaseSensitive ) const


Actually, the header refers to QBool, as you correctly point out:

        inline QBool contains(const QString &str, Qt::CaseSensitivity cs = 
Qt::CaseSensitive) const;



So there's a "bug" in the docs... am I right?

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to