diff options
Diffstat (limited to 'src/xmlpatterns')
-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 | ||||
-rw-r--r-- | src/xmlpatterns/data/qatomicvalue.cpp | 2 | ||||
-rw-r--r-- | src/xmlpatterns/utils/qautoptr_p.h | 2 |
5 files changed, 12 insertions, 14 deletions
diff --git a/src/xmlpatterns/api/quriloader.cpp b/src/xmlpatterns/api/quriloader.cpp index e0a7542..c653661 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 612fa67..648fda4 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 55af49b..4d6a3b6 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(); diff --git a/src/xmlpatterns/data/qatomicvalue.cpp b/src/xmlpatterns/data/qatomicvalue.cpp index ecc78bf..700f7ea 100644 --- a/src/xmlpatterns/data/qatomicvalue.cpp +++ b/src/xmlpatterns/data/qatomicvalue.cpp @@ -121,7 +121,7 @@ QVariant AtomicValue::toQt(const AtomicValue *const value) || BuiltinTypes::xsHexBinary->xdtTypeMatches(t)) return QVariant(value->as<Base64Binary>()->asByteArray()); else if(BuiltinTypes::xsQName->xdtTypeMatches(t)) - return qVariantFromValue(value->as<QNameValue>()->qName()); + return QVariant::fromValue(value->as<QNameValue>()->qName()); else { /* A type we don't support in Qt. Includes xs:time currently. */ diff --git a/src/xmlpatterns/utils/qautoptr_p.h b/src/xmlpatterns/utils/qautoptr_p.h index 060e7be..173999f 100644 --- a/src/xmlpatterns/utils/qautoptr_p.h +++ b/src/xmlpatterns/utils/qautoptr_p.h @@ -122,7 +122,6 @@ namespace QPatternist return *this; } -#ifndef QT_NO_MEMBER_TEMPLATES template<typename L> operator AutoPtrRef<L>() { @@ -139,7 +138,6 @@ namespace QPatternist inline AutoPtr(AutoPtr<L>& other) : m_ptr(other.release()) { } -#endif inline T *release() { |