diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-24 15:11:38 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-31 09:08:44 +0000 |
commit | 9d84d16e09df4851abfdcff640ccacb51f6244b9 (patch) | |
tree | f2c29e602e96d763b808bb94408225e055af5273 /tests/auto/qxmlquery | |
parent | 1e4dd3aa1cea2cfc1bcda27942f7865aedf6fa2f (diff) | |
download | qtxmlpatterns-9d84d16e09df4851abfdcff640ccacb51f6244b9.tar.gz |
Tests: Remove QT_DISABLE_DEPRECATED_BEFORE=0 for simple cases.
Fix usage of API that is marked deprecated.
Change-Id: If9622110d9ab2b1796602144ff484cdc3ac1f014
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Diffstat (limited to 'tests/auto/qxmlquery')
-rw-r--r-- | tests/auto/qxmlquery/qxmlquery.pro | 1 | ||||
-rw-r--r-- | tests/auto/qxmlquery/tst_qxmlquery.cpp | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/qxmlquery/qxmlquery.pro b/tests/auto/qxmlquery/qxmlquery.pro index 54a30a7..7dca9b9 100644 --- a/tests/auto/qxmlquery/qxmlquery.pro +++ b/tests/auto/qxmlquery/qxmlquery.pro @@ -24,4 +24,3 @@ wince*: { DEPLOYMENT += addFiles patternistFiles } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp index 3350911..30a900f 100644 --- a/tests/auto/qxmlquery/tst_qxmlquery.cpp +++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp @@ -1257,12 +1257,12 @@ void tst_QXmlQuery::basicXQueryToQtTypeCheck() const * just artifacts created somewhere. */ if(produced.type() == QVariant::Double) QVERIFY(qFuzzyCompare(produced.toDouble(), expected.toDouble())); - else if(qVariantCanConvert<QXmlName>(produced)) + else if (produced.canConvert<QXmlName>()) { /* QVariant::operator==() does identity comparison, it doesn't delegate to operator==() of * the contained type, unless it's hardcoded into QVariant. */ - const QXmlName n1 = qVariantValue<QXmlName>(produced); - const QXmlName n2 = qVariantValue<QXmlName>(expected); + const QXmlName n1 = qvariant_cast<QXmlName>(produced); + const QXmlName n2 = qvariant_cast<QXmlName>(expected); QCOMPARE(n1, n2); } else |