summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearraylist.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-08-04 23:57:51 -0300
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-08-09 09:05:43 +0200
commitdcf9883dffc88355402e5697f0572e5241e1c062 (patch)
treee7a9d1d2edfd7f9c3210f8dbe8ac2697a3397125 /src/corelib/tools/qbytearraylist.cpp
parent2431bf1b20e2815e0da3d294cce129de775b8f39 (diff)
Move the special QByteArrayList methods into QList
and make QByteArrayList be a simple typedef. As a side-effect, the constructor taking a QByteArray is no longer available since I couldn't find a way to add it to QList<T> when T is QByteArray. My template-foo failed me. I tried: - QEnableIf<is_same<T, QByteArray>::value, QByteArray>::type => makes QList fail to compile for any T that isn't QByteArray - make the constructor a template member => it compiles if the parameter is a QByteArray, but not a const char[4] like the test was - inheriting constructors => runs into ICC and Clang bugs that I could not work around Besides, the constructor with std::initializer_list is a superior solution anyway. Change-Id: Ic86fbadc1104142bfd907a5c4147199bf839fb89 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/corelib/tools/qbytearraylist.cpp')
-rw-r--r--src/corelib/tools/qbytearraylist.cpp145
1 files changed, 3 insertions, 142 deletions
diff --git a/src/corelib/tools/qbytearraylist.cpp b/src/corelib/tools/qbytearraylist.cpp
index beb6a32df7..8fc16dc1a4 100644
--- a/src/corelib/tools/qbytearraylist.cpp
+++ b/src/corelib/tools/qbytearraylist.cpp
@@ -82,10 +82,9 @@ QT_BEGIN_NAMESPACE
\reentrant
- QByteArrayList inherits from QList<QByteArray>. Like QList, QByteArrayList is
- \l{implicitly shared}. It provides fast index-based access as well as fast
- insertions and removals. Passing string lists as value parameters is both
- fast and safe.
+ QByteArrayList is actually just a QList<QByteArray>. It is documented as a
+ full class just for simplicity of documenting the member methods that exist
+ only in QList<QByteArray>.
All of QList's functionality also applies to QByteArrayList. For example, you
can use isEmpty() to test whether the list is empty, and you can call
@@ -106,88 +105,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QByteArrayList::QByteArrayList()
-
- Constructs an empty byte array list.
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList(const QByteArray &ba)
-
- Constructs a byte array list that contains the given byte array,
- \a ba. Longer lists are easily created like this:
-
- \snippet qbytearraylist/main.cpp 0
-
- \sa append()
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList(const QList<QByteArray> &other)
-
- Constructs a copy of \a other.
-
- This operation takes \l{constant time}, because QByteArrayList is
- \l{implicitly shared}. This makes returning a QByteArrayList from a
- function very fast. If a shared instance is modified, it will be
- copied (copy-on-write), and that takes \l{linear time}.
-
- \sa operator=()
-*/
-
-/*!
- \fn QByteArrayList::QByteArrayList(QList<QByteArray> &&other)
-
- \overload
-
- Move-constructs from \a other.
-
- This constructor is only enabled if the compiler supports C++11
- move semantics.
-
- \sa operator=()
-*/
-
-/*! \fn QByteArrayList::QByteArrayList(std::initializer_list<QByteArray> args)
-
- Constructs a list from a std::initializer_list given by \a args.
-
- This constructor is only enabled if the compiler supports C++11 initializer
- lists.
-*/
-
-/*!
- \fn QByteArrayList &QByteArrayList::operator=(const QList<QByteArray> &other)
-
- Assigns the contents of \a other to this byte array list and returns
- a reference to \c *this.
-*/
-
-/*!
- \fn QByteArrayList &QByteArrayList::operator=(QList<QByteArray> &&other)
-
- \overload
-
- Move-assigns the contents of \a other to this byte array list and returns
- a reference to \c *this.
-
- This operator is only enabled if the compiler supports C++11 move
- semantics.
-*/
-
-/*!
- \fn QByteArrayList &QByteArrayList::operator=(std::initializer_list<QByteArray> args)
-
- \overload
-
- Assigns the byte arrays from the initializer_list \a args to this byte array
- list and returns a reference to \c *this.
-
- This operator is only enabled if the compiler supports C++11 initializer
- lists.
-*/
-
-/*!
\fn QByteArray QByteArrayList::join() const
Joins all the byte arrays into a single byte array.
@@ -235,60 +152,4 @@ QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that, const char
return res;
}
-/*!
- \fn QByteArrayList operator+(const QByteArrayList &list1, const QByteArrayList &list2)
- \fn QByteArrayList operator+(const QByteArrayList &list1, const QList<QByteArray> &list2)
- \fn QByteArrayList operator+(const QList<QByteArray> &list1, const QByteArrayList &list2)
- \fn QByteArrayList operator+(QByteArrayList &&list1, const QByteArrayList &list2)
- \fn QByteArrayList operator+(QByteArrayList &&list1, const QList<QByteArray> &list2)
- \relates QByteArrayList
-
- Returns a byte array list that is the concatenation of \a list1 and \a list2.
-*/
-
-/*!
- \fn QByteArrayList& operator+=(QByteArrayList &list1, const QList<QByteArray> &list2)
- \relates QByteArrayList
-
- Appends \a list2 (which may be a QByteArrayList itself) to \a
- list1 and returns a reference to \a list1.
-*/
-
-/*!
- \fn QByteArrayList &QByteArrayList::operator<<(const QByteArray &ba)
-
- Appends the given byte array, \a ba, to this byte array list and returns
- a reference to the byte array list.
-
- \sa append()
-*/
-
-/*!
- \fn QByteArrayList &QByteArrayList::operator<<(const QList<QByteArray> &other)
-
- \overload
-
- Appends the list of byte arrays \a other (which may be a
- QByteArrayList itself) to this byte array list and returns a
- reference to \c *this. */
-
-/*!
- \fn QDataStream &operator>>(QDataStream &in, QByteArrayList &list)
- \relates QByteArrayList
-
- Reads a byte array list from the given \a in stream into the specified
- \a list.
-
- \sa {Serializing Qt Data Types}
-*/
-
-/*!
- \fn QDataStream &operator<<(QDataStream &out, const QByteArrayList &list)
- \relates QByteArrayList
-
- Writes the given byte array \a list to the specified \a out stream.
-
- \sa {Serializing Qt Data Types}
-*/
-
QT_END_NAMESPACE