diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2012-12-12 22:11:43 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2012-12-12 22:11:43 +0200 |
commit | da4b94e7c65a80f8900fa5e83456db9531d7d04e (patch) | |
tree | 8a0f971d142d4a7b675d4b02cdb8f8890a1084ff | |
parent | 3d6636b2565dbf71ecefa3a1f90818690277c3ef (diff) |
discoverertest: Use ADL in QGlib::Value equality operators to make the test work with clang
-rw-r--r-- | tests/auto/discoverertest.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/discoverertest.cpp b/tests/auto/discoverertest.cpp index 8154b17..59212d8 100644 --- a/tests/auto/discoverertest.cpp +++ b/tests/auto/discoverertest.cpp @@ -35,19 +35,23 @@ static Tag makeTag(const char *name, const QGlib::Value &value) return qMakePair(name, value); } +namespace QGlib { + // Declare a simple compare operator for QGlib::Value. // Comparing by string value isn't accurate at all, but good enough for our testing purposes. -static bool operator ==(const QGlib::Value &a, const QGlib::Value &b) +static bool operator ==(const Value &a, const Value &b) { bool okA = false, okB = false; return a.type() == b.type() && a.toString(&okA) == b.toString(&okB) && okA && okB; } -static bool operator !=(const QGlib::Value &a, const QGlib::Value &b) +static bool operator !=(const Value &a, const Value &b) { return !(a == b); } +} //namespace QGlib + // This classes describes what kind of streams we expect. class StreamInfo : public QSharedData { |