diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2012-02-05 21:25:31 +0100 |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2012-02-05 21:26:33 +0100 |
commit | d065dfd454890c332482a6109ed34a989e50809b (patch) | |
tree | 0d3e9c5367c1fad7d089d368182374e8d1d46ca1 /src/corelib/tools/qbytearray.h | |
parent | 632840cb0f5ad355d87fc040b015d04af86371ec (diff) | |
parent | 9f54846d951838361f4188b423e7aa7c7b9a9540 (diff) |
Merge remote-tracking branch 'gerrit/master' into containers
Conflicts:
src/corelib/tools/qstring.cpp
Change-Id: I23d214bf33c2badfae1876da3cc7d6d8f6e635fb
Diffstat (limited to 'src/corelib/tools/qbytearray.h')
-rw-r--r-- | src/corelib/tools/qbytearray.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index bf75ef6ead..5efeb6025e 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -68,7 +68,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Core) /***************************************************************************** Safe and portable C string functions; extensions to standard string.h @@ -232,9 +231,9 @@ public: int lastIndexOf(const char *c, int from = -1) const; int lastIndexOf(const QByteArray &a, int from = -1) const; - QBool contains(char c) const; - QBool contains(const char *a) const; - QBool contains(const QByteArray &a) const; + bool contains(char c) const; + bool contains(const char *a) const; + bool contains(const QByteArray &a) const; int count(char c) const; int count(const char *a) const; int count(const QByteArray &a) const; @@ -524,10 +523,10 @@ inline void QByteArray::push_front(const char *c) { prepend(c); } inline void QByteArray::push_front(const QByteArray &a) { prepend(a); } -inline QBool QByteArray::contains(const QByteArray &a) const -{ return QBool(indexOf(a) != -1); } -inline QBool QByteArray::contains(char c) const -{ return QBool(indexOf(c) != -1); } +inline bool QByteArray::contains(const QByteArray &a) const +{ return indexOf(a) != -1; } +inline bool QByteArray::contains(char c) const +{ return indexOf(c) != -1; } inline bool operator==(const QByteArray &a1, const QByteArray &a2) { return (a1.size() == a2.size()) && (memcmp(a1.constData(), a2.constData(), a1.size())==0); } inline bool operator==(const QByteArray &a1, const char *a2) @@ -576,8 +575,8 @@ inline const QByteArray operator+(const char *a1, const QByteArray &a2) inline const QByteArray operator+(char a1, const QByteArray &a2) { return QByteArray(&a1, 1) += a2; } #endif // QT_USE_QSTRINGBUILDER -inline QBool QByteArray::contains(const char *c) const -{ return QBool(indexOf(c) != -1); } +inline bool QByteArray::contains(const char *c) const +{ return indexOf(c) != -1; } inline QByteArray &QByteArray::replace(char before, const char *c) { return replace(&before, 1, c, qstrlen(c)); } inline QByteArray &QByteArray::replace(const QByteArray &before, const char *c) |