diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-03-26 15:21:38 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-11 22:54:40 +0200 |
commit | d5b7b4e41cb9fa6cd14129336ce853a0564a7fea (patch) | |
tree | 9913fb853884dea0023752b48faaada5318ef0a5 /src/corelib/tools/qstringlist.cpp | |
parent | a74e4b85be83e2da47f4a1d8fcf0e78079335b80 (diff) |
QStringList: add op= overloads for QList<QString>
QStringList = QList<QString> already compiled, but was interpreted as
QStringList = QStringList(QList<QString>), which involves the QList
copy ctor. Adding the overload saves that copy.
Cannot use a using declaration here, since the return type is different.
Change-Id: I9f4feb2f97480d2d6a3b6fa7c71b5d511b623601
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstringlist.cpp')
-rw-r--r-- | src/corelib/tools/qstringlist.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp index a9d704ca4c..c735fbcc42 100644 --- a/src/corelib/tools/qstringlist.cpp +++ b/src/corelib/tools/qstringlist.cpp @@ -204,6 +204,27 @@ QT_BEGIN_NAMESPACE */ /*! + \fn QStringList &QStringList::operator=(const QList<QString> &other) + \since 5.4 + + Copy assignment operator from QList<QString>. Assigns the \a other + list of strings to this string list. + + After the operation, \a other and \c *this will be equal. +*/ + +/*! + \fn QStringList &QStringList::operator=(QList<QString> &&other) + \overload + \since 5.4 + + Move assignment operator from QList<QString>. Moves the \a other + list of strings to this string list. + + After the operation, \a other will be empty. +*/ + +/*! \fn void QStringList::sort(Qt::CaseSensitivity cs) Sorts the list of strings in ascending order. |