From b3b1c3a573979cac69a3932d1edf3a046c1d8b8a Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 8 Nov 2012 10:10:40 +0100 Subject: [PATCH] Fix compilation issue with clang in C++11 mode. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/qml/qml/v8/qv8engine_p.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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); } -- 1.7.2.5