diff options
author | David Faure <david.faure@kdab.com> | 2020-11-06 20:20:23 +0100 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2020-11-07 11:13:39 +0100 |
commit | 4f98bf713f6604903c4fe61adc750b23c4407a18 (patch) | |
tree | fbd2c6a57414a34665312b23c7b82e582df15ee3 /tests | |
parent | c1d4fcb4648fec3396081d24280fbd6cfb9adb4d (diff) |
qtdeclarative: finish fixing compilation with explicit QChar(int)
Change-Id: Idb26e2df6d4fe8940db57066a30fa8c243f6d2c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp index 6505cb46c6..5a2a1be51f 100644 --- a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp +++ b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp @@ -415,7 +415,7 @@ public: QString stringProperty() const { return m_stringProperty;} QChar qcharProperty() const { return m_qcharProperty; } - QChar constQChar() const { return 0x25cf; /* Unicode: black circle */ } + QChar constQChar() const { return u'\u25cf'; /* Unicode: black circle */ } void setStringProperty(QString arg) { m_stringProperty = arg; } void setQcharProperty(QChar arg) { m_qcharProperty = arg; } @@ -1454,7 +1454,7 @@ void tst_qqmlproperty::write() QQmlProperty qcharProperty(&o, "qcharProperty"); QQmlProperty stringProperty(&o, "stringProperty"); - const int black_circle = 0x25cf; + const char16_t black_circle = 0x25cf; QCOMPARE(qcharProperty.write(QString("foo")), false); QCOMPARE(qcharProperty.write('Q'), true); diff --git a/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp index 0cbfc958cf..2829ab08a1 100644 --- a/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp +++ b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp @@ -1714,7 +1714,7 @@ void tst_qqmlvaluetypes::sequences() QCOMPARE(value.property(i).property("baseProperty").toInt(), container.at(i).baseProperty()); } { - QVector<QChar> qcharVector{1, 4, 42, 8, 15}; + QVector<QChar> qcharVector{QChar(1), QChar(4), QChar(42), QChar(8), QChar(15)}; QJSValue value = engine.toScriptValue(qcharVector); QCOMPARE(value.property("length").toInt(), qcharVector.length()); for (int i = 0; i < qcharVector.length(); ++i) |