From c924c05ae226524755b1701a5a40e436a08ca2e6 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 21 Mar 2022 09:02:48 +0100 Subject: Replace deprecated QColor::fromString in tests and documentation Don't use deprecated methods in tests, and don't refer to them in documentation. Change-Id: I110480742d9a7b9b0a2e194e3fe610208c1e07da Reviewed-by: Marc Mutz --- tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/gui/kernel/qguivariant') diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp index aea5cb3ac3..093b9c8eaf 100644 --- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp +++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp @@ -245,7 +245,7 @@ void tst_QGuiVariant::toColor_data() QTest::newRow("qstring(#ff0000)") << QVariant(QString::fromUtf8("#ff0000")) << c; QTest::newRow("qbytearray(#ff0000)") << QVariant(QByteArray("#ff0000")) << c; - c.setNamedColor("#88112233"); + c = QColor::fromString("#88112233"); QTest::newRow("qstring(#88112233)") << QVariant(QString::fromUtf8("#88112233")) << c; QTest::newRow("qbytearray(#88112233)") << QVariant(QByteArray("#88112233")) << c; } -- cgit v1.2.3