Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / src / declarative / qml / ftw / qhashedstring.cpp
index 41adc26..13b0e55 100644 (file)
@@ -1,8 +1,7 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
 **
 ** This file is part of the QtDeclarative module of the Qt Toolkit.
 **
@@ -35,6 +34,7 @@
 **
 **
 **
+**
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
@@ -83,7 +83,7 @@ uint32_t calculateHash(const schar* chars, int length) {
             int d = c - '0';
             if (is_first_char) {
                 is_first_char = false;
-                if (c = '0' && length > 1) {
+                if (c == '0' && length > 1) {
                     is_array_index = false;
                     continue;
                 }
@@ -465,3 +465,15 @@ void QHashedStringRef::writeUtf8(char *output) const
         }
     }
 }
+
+QString QHashedCStringRef::toUtf16() const
+{
+    if (m_length == 0)
+        return QString();
+
+    QString rv;
+    rv.resize(m_length);
+    writeUtf16((uint16_t*)rv.data());
+    return rv;
+}
+