/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
inline v8::Handle<v8::String> string() const;
+ inline QString toString() const;
+
private:
v8::String::CompleteHashData m_hash;
v8::Handle<v8::String> m_string;
return m_string;
}
+QString QHashedV8String::toString() const
+{
+ QString result;
+ result.reserve(m_hash.length);
+
+ for (int i = 0; i < m_hash.length; ++i)
+ result.append(m_string->GetCharacter(i));
+
+ return result;
+}
+
QHashedStringRef::QHashedStringRef()
: m_data(0), m_length(0), m_utf8length(-1), m_hash(0)
{