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 /tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp | |
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 'tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp')
-rw-r--r-- | tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp index f8dfdbd3b0..b82b277781 100644 --- a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp +++ b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp @@ -200,7 +200,7 @@ static void dumpGlConfiguration(QOpenGLContext &context, QTextStream &str) << "\nShading language : " << reinterpret_cast<const char *>(functions.glGetString(GL_SHADING_LANGUAGE_VERSION)) << "\nFormat : " << context.format(); - QList<QByteArray> extensionList = context.extensions().toList(); + QList<QByteArray> extensionList = context.extensions().values(); std::sort(extensionList.begin(), extensionList.end()); const int extensionCount = extensionList.size(); str << "\n\nFound " << extensionCount << " extensions:\n"; @@ -233,9 +233,9 @@ void tst_QOpenGlConfig::testGlConfiguration() static inline QByteArray msgSetMismatch(const QSet<QString> &expected, const QSet<QString> &actual) { - const QString result = QStringList(expected.toList()).join(QLatin1Char(',')) + const QString result = QStringList(expected.values()).join(QLatin1Char(',')) + QLatin1String(" != ") - + QStringList(actual.toList()).join(QLatin1Char(',')); + + QStringList(actual.values()).join(QLatin1Char(',')); return result.toLatin1(); } |