QVersionNumber: don't detach() in rvalue QList/QVector ctor
Qt 5 uses begin() so the fix there will be to use cbegin(). Found by Clang -ftime-trace pin-pointing repeated instantiations of QList<int>::data(). Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-97601 Change-Id: I6410e5b303766fdbc7e158a9ac1263adec973099 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
5d4f8a947c
commit
552d1c9166
@ -136,8 +136,8 @@ class QVersionNumber
|
||||
|
||||
explicit SegmentStorage(QList<int> &&seg)
|
||||
{
|
||||
if (dataFitsInline(seg.data(), seg.size()))
|
||||
setInlineData(seg.data(), seg.size());
|
||||
if (dataFitsInline(std::as_const(seg).data(), seg.size()))
|
||||
setInlineData(std::as_const(seg).data(), seg.size());
|
||||
else
|
||||
pointer_segments = new QList<int>(std::move(seg));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user