aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2012-11-08 10:10:40 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-08 17:15:34 +0100
commitb3b1c3a573979cac69a3932d1edf3a046c1d8b8a (patch)
tree42b13b959111d9a22e0049ba430ecb37008c80bd /src
parentd617bbd31d2e2f1eb5609a82a71adad81ce3844f (diff)
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<v8::Object> &object, uint seed) Change-Id: I917785ce5ce596757fe06ced1536797090bb0f77 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/v8/qv8engine_p.h2
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 1c107bd9bf..8320a89706 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<v8::Object> &object, uint seed)
+inline uint qHash(const v8::Handle<v8::Object> &object, uint seed = 0)
{
return (object->GetIdentityHash() ^ seed);
}