Commit 4be24036 authored by Volker Krause's avatar Volker Krause
Browse files

Add explicit comparison operator for ExtractorDocumentNode

Needed with Qt6 for node comparison to work in JS, as done for example
in the script engine unit test.
parent 34ce1725
......@@ -81,6 +81,11 @@ ExtractorDocumentNode& ExtractorDocumentNode::operator=(ExtractorDocumentNode &&
return *this;
}
bool ExtractorDocumentNode::operator==(const ExtractorDocumentNode &other) const
{
return d.get() == other.d.get();
}
bool ExtractorDocumentNode::isNull() const
{
return d->content.isNull() || !d->processor || d->mimeType.isEmpty();
......
......@@ -86,6 +86,8 @@ public:
ExtractorDocumentNode& operator=(const ExtractorDocumentNode &other);
ExtractorDocumentNode& operator=(ExtractorDocumentNode &&other);
bool operator==(const ExtractorDocumentNode &other) const;
/** Returns @c true if this is a null instance. */
bool isNull() const;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment