QStringList: add move ctor from QList<QString>
Change-Id: I93fe4656c1a608ccc828bd9db528d4597a22f070 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
d5b7b4e41c
commit
0b2bd6be6c
|
|
@ -203,6 +203,16 @@ QT_BEGIN_NAMESPACE
|
|||
\sa operator=()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QStringList::QStringList(QList<QString> &&other)
|
||||
\overload
|
||||
\since 5.4
|
||||
|
||||
Move-constructs from QList<QString>.
|
||||
|
||||
After a successful construction, \a other will be empty.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QStringList &QStringList::operator=(const QList<QString> &other)
|
||||
\since 5.4
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ public:
|
|||
inline QStringList() { }
|
||||
inline explicit QStringList(const QString &i) { append(i); }
|
||||
inline QStringList(const QList<QString> &l) : QList<QString>(l) { }
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
inline QStringList(QList<QString> &&l) : QList<QString>(std::move(l)) { }
|
||||
#endif
|
||||
#ifdef Q_COMPILER_INITIALIZER_LISTS
|
||||
inline QStringList(std::initializer_list<QString> args) : QList<QString>(args) { }
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue