summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-28 03:00:53 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-28 03:00:53 +0200
commitc515a2cab29c0c55d64a509850214869acdbb40c (patch)
tree9bf26c3c9fc3a6ad0209693b55f2f8d1ceef109e
parent6dad1c365278e2b324b37cafaef4e7985182f5b8 (diff)
parent1a254ab116f63b8188b9bc12cdd19e6d5696c3f2 (diff)
downloadqtxmlpatterns-c515a2cab29c0c55d64a509850214869acdbb40c.tar.gz
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Ic81ebebfb9966bf7d450dacb403242c2f7dafba1
-rw-r--r--src/xmlpatterns/api/qsourcelocation.cpp9
-rw-r--r--tests/auto/qsourcelocation/tst_qsourcelocation.cpp4
2 files changed, 7 insertions, 6 deletions
diff --git a/src/xmlpatterns/api/qsourcelocation.cpp b/src/xmlpatterns/api/qsourcelocation.cpp
index 7d61c17..a416cda 100644
--- a/src/xmlpatterns/api/qsourcelocation.cpp
+++ b/src/xmlpatterns/api/qsourcelocation.cpp
@@ -94,7 +94,8 @@ QSourceLocation::~QSourceLocation()
}
/*!
- Returns true if this QSourceLocation is identical to \a other.
+ Returns \c true if this QSourceLocation is equal to \a other; \c false
+ otherwise.
Two QSourceLocation instances are equal if their uri(), line() and
column() are equal.
@@ -110,12 +111,12 @@ bool QSourceLocation::operator==(const QSourceLocation &other) const
}
/*!
- Returns the opposite of applying operator==() for this QXmlName
- and \a other.
+ Returns \c true if this QSourceLocation is not equal to \a other; \c false
+ otherwise.
*/
bool QSourceLocation::operator!=(const QSourceLocation &other) const
{
- return operator==(other);
+ return !operator==(other);
}
/*!
diff --git a/tests/auto/qsourcelocation/tst_qsourcelocation.cpp b/tests/auto/qsourcelocation/tst_qsourcelocation.cpp
index 984da1d..b5b33c7 100644
--- a/tests/auto/qsourcelocation/tst_qsourcelocation.cpp
+++ b/tests/auto/qsourcelocation/tst_qsourcelocation.cpp
@@ -186,7 +186,7 @@ void tst_QSourceLocation::equalnessOperator() const
QFETCH(bool, True);
QCOMPARE(v1 == v2, True);
- QCOMPARE(v1 != v2, True);
+ QCOMPARE(v1 != v2, !True);
}
void tst_QSourceLocation::equalnessOperator_data() const
@@ -273,7 +273,7 @@ void tst_QSourceLocation::constCorrectness() const
QCOMPARE(def, def2);
/* Inverse equalness operator. */
- QVERIFY(def != def2);
+ QVERIFY(!(def != def2));
}
void tst_QSourceLocation::objectSize() const