From bc6456d722e7a23f145baf13b8d1c15f81513aad Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Tue, 21 Aug 2012 10:26:05 +0100 Subject: [PATCH] Fix compilation on Linux with gcc-4.6 Also make use of the seed. Change-Id: I03bd961489d95504bf973c02d51979904fbd9b1c Reviewed-by: Thiago Macieira Reviewed-by: Kent Hansen Reviewed-by: Marc Mutz --- src/qml/qml/v8/qv8engine_p.h | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h index 9abdb84..28acd15 100644 --- a/src/qml/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -83,6 +83,16 @@ #include "qv8sequencewrapper_p.h" #include "qv8jsonwrapper_p.h" +namespace v8 { + +// Needed for V8ObjectSet +inline uint qHash(const v8::Handle &object, uint seed) +{ + return (object->GetIdentityHash() ^ seed); +} + +} + QT_BEGIN_NAMESPACE @@ -616,13 +626,6 @@ QV8Engine::Deletable *QV8Engine::extensionData(int index) const return 0; } -// Needed for V8ObjectSet -template<> -inline uint qHash >(const v8::Handle &object, uint /*seed*/) -{ - return object->GetIdentityHash(); -} - QT_END_NAMESPACE #endif // QQMLV8ENGINE_P_H -- 1.7.2.5