diff options
Diffstat (limited to 'src/xmlpatterns/api')
-rw-r--r-- | src/xmlpatterns/api/quriloader.cpp | 2 | ||||
-rw-r--r-- | src/xmlpatterns/api/qvariableloader.cpp | 14 | ||||
-rw-r--r-- | src/xmlpatterns/api/qxmlquery.cpp | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/xmlpatterns/api/quriloader.cpp b/src/xmlpatterns/api/quriloader.cpp index e555425..85b2f1f 100644 --- a/src/xmlpatterns/api/quriloader.cpp +++ b/src/xmlpatterns/api/quriloader.cpp @@ -69,7 +69,7 @@ QNetworkReply *URILoader::createRequest(Operation op, const QNetworkRequest &req const QVariant variant(m_variableLoader->valueFor(m_namePool->allocateQName(QString(), name, QString()))); if(!variant.isNull() && variant.userType() == qMetaTypeId<QIODevice *>()) - return new QIODeviceDelegate(qVariantValue<QIODevice *>(variant)); + return new QIODeviceDelegate(qvariant_cast<QIODevice *>(variant)); else { /* If we're entering this code path, the variable URI identified a variable diff --git a/src/xmlpatterns/api/qvariableloader.cpp b/src/xmlpatterns/api/qvariableloader.cpp index eb0ca5c..fde8833 100644 --- a/src/xmlpatterns/api/qvariableloader.cpp +++ b/src/xmlpatterns/api/qvariableloader.cpp @@ -131,12 +131,12 @@ SequenceType::Ptr VariableLoader::announceExternalVariable(const QXmlName name, return CommonSequenceTypes::ExactlyOneAnyURI; else if(variant.userType() == qMetaTypeId<QXmlQuery>()) { - const QXmlQuery variableQuery(qVariantValue<QXmlQuery>(variant)); + const QXmlQuery variableQuery(qvariant_cast<QXmlQuery>(variant)); return variableQuery.d->expression()->staticType(); } else { - return makeGenericSequenceType(AtomicValue::qtToXDMType(qVariantValue<QXmlItem>(variant)), + return makeGenericSequenceType(AtomicValue::qtToXDMType(qvariant_cast<QXmlItem>(variant)), Cardinality::exactlyOne()); } } @@ -154,12 +154,12 @@ Item::Iterator::Ptr VariableLoader::evaluateSequence(const QXmlName name, return makeSingletonIterator(itemForName(name)); else if(variant.userType() == qMetaTypeId<QXmlQuery>()) { - const QXmlQuery variableQuery(qVariantValue<QXmlQuery>(variant)); + const QXmlQuery variableQuery(qvariant_cast<QXmlQuery>(variant)); return variableQuery.d->expression()->evaluateSequence(DynamicContext::Ptr(new TemporaryTreesRedirectingContext(variableQuery.d->dynamicContext(), context))); } - const QVariant v(qVariantValue<QXmlItem>(variant).toAtomicValue()); + const QVariant v(qvariant_cast<QXmlItem>(variant).toAtomicValue()); switch(v.type()) { @@ -179,7 +179,7 @@ Item VariableLoader::itemForName(const QXmlName &name) const if(variant.userType() == qMetaTypeId<QIODevice *>()) return Item(AnyURI::fromValue(QLatin1String("tag:trolltech.com,2007:QtXmlPatterns:QIODeviceVariable:") + m_namePool->stringForLocalName(name.localName()))); - const QXmlItem item(qVariantValue<QXmlItem>(variant)); + const QXmlItem item(qvariant_cast<QXmlItem>(variant)); if(item.isNode()) return Item::fromPublic(item); @@ -210,8 +210,8 @@ bool VariableLoader::isSameType(const QVariant &v1, return true; /* Ok, we have two QXmlItems. */ - const QXmlItem i1(qVariantValue<QXmlItem>(v1)); - const QXmlItem i2(qVariantValue<QXmlItem>(v2)); + const QXmlItem i1(qvariant_cast<QXmlItem>(v1)); + const QXmlItem i2(qvariant_cast<QXmlItem>(v2)); if(i1.isNode()) { diff --git a/src/xmlpatterns/api/qxmlquery.cpp b/src/xmlpatterns/api/qxmlquery.cpp index 481b3f2..e69fe50 100644 --- a/src/xmlpatterns/api/qxmlquery.cpp +++ b/src/xmlpatterns/api/qxmlquery.cpp @@ -534,7 +534,7 @@ void QXmlQuery::bindVariable(const QXmlName &name, const QXmlItem &value) } const QPatternist::VariableLoader::Ptr vl(d->variableLoader()); - const QVariant variant(qVariantFromValue(value)); + const QVariant variant(QVariant::fromValue(value)); /* If the type of the variable changed(as opposed to only the value), * we will have to recompile. */ @@ -610,7 +610,7 @@ void QXmlQuery::bindVariable(const QXmlName &name, QIODevice *device) if(device) { - const QVariant variant(qVariantFromValue(device)); + const QVariant variant(QVariant::fromValue(device)); if(vl->invalidationRequired(name, variant)) d->recompileRequired(); @@ -1184,7 +1184,7 @@ void QXmlQuery::bindVariable(const QXmlName &name, const QXmlQuery &query) Q_ASSERT_X(query.isValid(), Q_FUNC_INFO, "The query being bound must be valid."); const QPatternist::VariableLoader::Ptr vl(d->variableLoader()); - const QVariant variant(qVariantFromValue(query)); + const QVariant variant(QVariant::fromValue(query)); if(vl->invalidationRequired(name, variant)) d->recompileRequired(); |