diff options
author | David Faure <faure@kde.org> | 2012-01-20 11:22:09 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-20 14:17:41 +0100 |
commit | 47d5d349d8f5bc590ca7cdf30bf13b69bddf3225 (patch) | |
tree | be75994c1d77e479d562d571ef9cfaf48f9583d9 /src/corelib/tools/qstringlist.cpp | |
parent | 841b0c4fac8e8a96ebb2120b704cf7bbf1260543 (diff) |
Remove QBool and use bool instead.
QBool was introduced with Qt-4.0, to detect Qt3-like code like
if (c.contains(d) == 2) and break compilation on such constructs.
This isn't necessary anymore, given that such code couldn't possibly
compile in Qt4 times.
And QBool was confusing developers, and creating compile errors (e.g.
QVariant doesn't have support for it), so better remove it for Qt 5.
Change-Id: I6642f43f5e12b872f98abb56600186179f072b09
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/tools/qstringlist.cpp')
-rw-r--r-- | src/corelib/tools/qstringlist.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp index 1fca78b03b..f260f65c77 100644 --- a/src/corelib/tools/qstringlist.cpp +++ b/src/corelib/tools/qstringlist.cpp @@ -266,7 +266,7 @@ QStringList QtPrivate::QStringList_filter(const QStringList *that, const QString /*! - \fn QBool QStringList::contains(const QString &str, Qt::CaseSensitivity cs) const + \fn bool QStringList::contains(const QString &str, Qt::CaseSensitivity cs) const Returns true if the list contains the string \a str; otherwise returns false. The search is case insensitive if \a cs is @@ -274,15 +274,15 @@ QStringList QtPrivate::QStringList_filter(const QStringList *that, const QString \sa indexOf(), lastIndexOf(), QString::contains() */ -QBool QtPrivate::QStringList_contains(const QStringList *that, const QString &str, - Qt::CaseSensitivity cs) +bool QtPrivate::QStringList_contains(const QStringList *that, const QString &str, + Qt::CaseSensitivity cs) { for (int i = 0; i < that->size(); ++i) { const QString & string = that->at(i); if (string.length() == str.length() && str.compare(string, cs) == 0) - return QBool(true); + return true; } - return QBool(false); + return false; } #ifndef QT_NO_REGEXP |