summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcollator_icu.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-02-06 10:14:29 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-02-13 08:42:46 +0000
commit0d2791c5f64fcb7f0ce4c2027d78fc39de514ab4 (patch)
tree8467804af94f271b6ce4a19e78548952430f59cf /src/corelib/tools/qcollator_icu.cpp
parenta85b4d79db5c11f5a309fbbc52e80a81096c0f01 (diff)
QCollatorSortKey: add some std::move
All implementations of QCollator::sortKey() can benefit from moving their CollatorKeyType into the QCollatorSortKeyPrivate on construction. So make the QCollatorSortKeyPrivate ctor a perfect forwarder for its m_key member, and add std::move() calls where they were missing (in all but one case, lvalues were passed). Make the ctor explicit, as it should have been from the beginning. Change-Id: I2a1cdda5fd23990ace019b963df895c621a1fa85 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/tools/qcollator_icu.cpp')
-rw-r--r--src/corelib/tools/qcollator_icu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qcollator_icu.cpp b/src/corelib/tools/qcollator_icu.cpp
index 26e2121092..ad98a187c5 100644
--- a/src/corelib/tools/qcollator_icu.cpp
+++ b/src/corelib/tools/qcollator_icu.cpp
@@ -145,7 +145,7 @@ QCollatorSortKey QCollator::sortKey(const QString &string) const
string.size(), (uint8_t *)result.data(), result.size());
}
result.truncate(size);
- return QCollatorSortKey(new QCollatorSortKeyPrivate(result));
+ return QCollatorSortKey(new QCollatorSortKeyPrivate(std::move(result)));
}
return QCollatorSortKey(new QCollatorSortKeyPrivate(QByteArray()));