summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Martins <sergio.martins@kdab.com>2015-05-30 10:44:14 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-05-30 19:34:07 +0000
commitc04b8c62759aa916551398a5a25b7db14d5519a1 (patch)
tree011d42b06947d24e6d88e74ed70db5808b075f89
parentce2d399aecf9ffa1dd6823d088b15a73400ccbbd (diff)
downloadqtxmlpatterns-c04b8c62759aa916551398a5a25b7db14d5519a1.tar.gz
Use QSet::intersects() instead of QSet::intersect()
It's much faster Change-Id: I959559a442ab6acf424d7798b9bcd01ab29e65e3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
-rw-r--r--src/xmlpatterns/schema/qxsdschemahelper.cpp2
-rw-r--r--src/xmlpatterns/schema/qxsdschemaresolver.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/xmlpatterns/schema/qxsdschemahelper.cpp b/src/xmlpatterns/schema/qxsdschemahelper.cpp
index f6e9b98..8a8314d 100644
--- a/src/xmlpatterns/schema/qxsdschemahelper.cpp
+++ b/src/xmlpatterns/schema/qxsdschemahelper.cpp
@@ -171,7 +171,7 @@ bool XsdSchemaHelper::isWildcardSubset(const XsdWildcard::Ptr &wildcard, const X
// 3
if ((constraint->variety() == XsdWildcard::NamespaceConstraint::Enumeration) && (otherConstraint->variety() == XsdWildcard::NamespaceConstraint::Not)) {
- if (constraint->namespaces().intersect(otherConstraint->namespaces()).isEmpty())
+ if (!constraint->namespaces().intersects(otherConstraint->namespaces()))
return true;
}
diff --git a/src/xmlpatterns/schema/qxsdschemaresolver.cpp b/src/xmlpatterns/schema/qxsdschemaresolver.cpp
index 469a239..14109d6 100644
--- a/src/xmlpatterns/schema/qxsdschemaresolver.cpp
+++ b/src/xmlpatterns/schema/qxsdschemaresolver.cpp
@@ -1413,7 +1413,7 @@ bool isValidWildcardRestriction(const XsdWildcard::Ptr &wildcard, const XsdWildc
}
if (baseWildcard->namespaceConstraint()->variety() == XsdWildcard::NamespaceConstraint::Not &&
wildcard->namespaceConstraint()->variety() == XsdWildcard::NamespaceConstraint::Enumeration) {
- if (!baseWildcard->namespaceConstraint()->namespaces().intersect(wildcard->namespaceConstraint()->namespaces()).isEmpty())
+ if (baseWildcard->namespaceConstraint()->namespaces().intersects(wildcard->namespaceConstraint()->namespaces()))
return false;
}
if (baseWildcard->namespaceConstraint()->variety() == XsdWildcard::NamespaceConstraint::Enumeration &&