From: Erik Verbruggen Date: Thu, 8 Nov 2012 09:10:40 +0000 (+0100) Subject: Fix compilation issue with clang in C++11 mode. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=b3b1c3a573979cac69a3932d1edf3a046c1d8b8a;p=konrad%2Fqtdeclarative.git Fix compilation issue with clang in C++11 mode. As with all other qHash functions, providing a default value for the seed is needed. Compiler error: In file included from qml/v8/qv8engine.cpp:42: In file included from qml/v8/qv8engine_p.h:57: In file included from /Users/erik/dev/qt5-stable/qtbase/include/QtCore/qvariant.h:1: In file included from /Users/erik/dev/qt5-stable/qtbase/include/QtCore/../../src/corelib/kernel/qvariant.h:50: In file included from /Users/erik/dev/qt5-stable/qtbase/include/QtCore/qhash.h:1: /Users/erik/dev/qt5-stable/qtbase/include/QtCore/../../src/corelib/tools/qhash.h:107:35: error: no matching function for call to 'qHash' Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(t))) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ [skipping macro expansion and candidate qHash functions] qml/v8/qv8engine_p.h:89:13: note: candidate function not viable: requires 2 arguments, but 1 was provided inline uint qHash(const v8::Handle &object, uint seed) Change-Id: I917785ce5ce596757fe06ced1536797090bb0f77 Reviewed-by: Friedemann Kleint Reviewed-by: Jędrzej Nowacki --- diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h index 1c107bd..8320a89 100644 --- a/src/qml/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -86,7 +86,7 @@ namespace v8 { // Needed for V8ObjectSet -inline uint qHash(const v8::Handle &object, uint seed) +inline uint qHash(const v8::Handle &object, uint seed = 0) { return (object->GetIdentityHash() ^ seed); }