diff options
author | Lars Knoll <lars.knoll@qt.io> | 2019-05-06 14:00:53 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-05-07 14:15:44 +0000 |
commit | 92f984273262531f909ede17a324f546fe502b5c (patch) | |
tree | ac4d4cb8796d9838607084629cf127e1641c28c0 /src/gui | |
parent | d510e1e7f919e01a3b875ff5a575b818e5ee03e8 (diff) |
Deprecate conversion functions between QList and QSet
Users should use range constructors instead to do the conversion.
Keep conversion methods between QList and QVector as these will turn
into a no-op in Qt 6, whereas forcing people to use range constructors
would lead to deep copies of the data.
Change-Id: Id9fc9e4d007044e019826da523e8418857c91283
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/opengl/qopengl.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtextodfwriter.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp index 6b701fe52b..667d16317f 100644 --- a/src/gui/opengl/qopengl.cpp +++ b/src/gui/opengl/qopengl.cpp @@ -80,7 +80,7 @@ QOpenGLExtensionMatcher::QOpenGLExtensionMatcher() if (extensionStr) { QByteArray ba(extensionStr); QList<QByteArray> extensions = ba.split(' '); - m_extensions = extensions.toSet(); + m_extensions = QSet<QByteArray>(extensions.constBegin(), extensions.constEnd()); } else { #ifdef QT_OPENGL_3 // clear error state diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index a62e7e425a..8eaad403d0 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -1007,7 +1007,7 @@ bool QTextOdfWriter::writeAll() // add objects for lists, frames and tables const QVector<QTextFormat> allFormats = m_document->allFormats(); - const QList<int> copy = formats.toList(); + const QList<int> copy = formats.values(); for (auto index : copy) { QTextObject *object = m_document->objectForFormat(allFormats[index]); if (object) { |