summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/schema/qxsdschemahelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlpatterns/schema/qxsdschemahelper.cpp')
-rw-r--r--src/xmlpatterns/schema/qxsdschemahelper.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/xmlpatterns/schema/qxsdschemahelper.cpp b/src/xmlpatterns/schema/qxsdschemahelper.cpp
index b0fbf31..f6e9b98 100644
--- a/src/xmlpatterns/schema/qxsdschemahelper.cpp
+++ b/src/xmlpatterns/schema/qxsdschemahelper.cpp
@@ -150,19 +150,6 @@ bool XsdSchemaHelper::wildcardAllowsExpandedName(const QXmlName &name, const Xsd
return true;
}
-// small helper function that should be available in Qt 4.6
-template<class T>
-static inline bool containsSet(const QSet<T> &super, const QSet<T> &sub)
-{
- QSetIterator<T> it(sub);
- while (it.hasNext()) {
- if (!super.contains(it.next()))
- return false;
- }
-
- return true;
-}
-
bool XsdSchemaHelper::isWildcardSubset(const XsdWildcard::Ptr &wildcard, const XsdWildcard::Ptr &otherWildcard)
{
// @see http://www.w3.org/TR/xmlschema11-1/#cos-ns-subset
@@ -178,7 +165,7 @@ bool XsdSchemaHelper::isWildcardSubset(const XsdWildcard::Ptr &wildcard, const X
// 2
if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration) && (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration)) {
- if (containsSet<QString>(otherConstraint->namespaces(), constraint->namespaces()))
+ if (otherConstraint->namespaces().contains(constraint->namespaces()))
return true;
}
@@ -190,7 +177,7 @@ bool XsdSchemaHelper::isWildcardSubset(const XsdWildcard::Ptr &wildcard, const X
// 4
if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Not) && (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Not)) {
- if (containsSet<QString>(constraint->namespaces(), otherConstraint->namespaces()))
+ if (constraint->namespaces().contains(otherConstraint->namespaces()))
return true;
}