From 3e75c2965c96fa014ab74121e84d623fd04a27f7 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 10 Jun 2019 00:09:10 +0200 Subject: Remove QLatin1Literal usages That's an undocumented Qt 4/3/2 remnant, start remove usages. Fix incorrect include header in qclass_lib_map.h as a drive-by. Change-Id: I939be2621bc03e5c75f7e3f152546d3af6d37b91 Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira --- tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp | 6 +++--- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto/corelib/kernel') diff --git a/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp b/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp index 681a5d0146..cc67fc7884 100644 --- a/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp +++ b/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp @@ -130,7 +130,7 @@ public: QString m_value; void setValue(const QString &value) { m_value = value; } QString getValue() { return m_value; } - void resetValue() { m_value = QLatin1Literal("reset"); } + void resetValue() { m_value = QLatin1String("reset"); } }; void tst_QMetaProperty::gadget() @@ -140,7 +140,7 @@ void tst_QMetaProperty::gadget() QVERIFY(valueProp.isValid()); { MyGadget g; - QString hello = QLatin1Literal("hello"); + QString hello = QLatin1String("hello"); QVERIFY(valueProp.writeOnGadget(&g, hello)); QCOMPARE(g.m_value, QLatin1String("hello")); QCOMPARE(valueProp.readOnGadget(&g), QVariant(hello)); @@ -242,7 +242,7 @@ void tst_QMetaProperty::conversion() QCOMPARE(custom.str, QString()); // or reset resetable QVERIFY(value7P.write(this, QVariant())); - QCOMPARE(value7, QLatin1Literal("reset")); + QCOMPARE(value7, QLatin1String("reset")); } QTEST_MAIN(tst_QMetaProperty) diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index f1c4effa95..7c9d8a476a 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -5979,7 +5979,7 @@ void ConnectToPrivateSlot::test(SenderObject* obj1) { obj1->signal1(); QCOMPARE(d->receivedCount, 1); QCOMPARE(d->receivedValue, QVariant()); - obj1->signal7(666, QLatin1Literal("_")); + obj1->signal7(666, QLatin1String("_")); QCOMPARE(d->receivedCount, 2); QCOMPARE(d->receivedValue, QVariant(666)); QVERIFY(QObjectPrivate::connect(obj1, &SenderObject::signal2, d, &ConnectToPrivateSlotPrivate::thisIsAPrivateSlot, Qt::UniqueConnection)); -- cgit v1.2.3