take a QString as identifier in QWebFrame::addToJSWindowObject.
[WebKit-https.git] / WebKit / qt / Api / qwebframe.cpp
index c70ac2f66e1a16806795d62ff7d6cd6e28324ac0..e12ab005b1a6f574d4dc41dfb985b3ef03c48c87 100644 (file)
@@ -139,7 +139,7 @@ QWebFrame::~QWebFrame()
     delete d;
 }
 
-void QWebFrame::addToJSWindowObject(const QByteArray &name, QObject *object)
+void QWebFrame::addToJSWindowObject(const QString &name, QObject *object)
 {
       KJS::JSLock lock;
       KJS::Window *window = KJS::Window::retrieveWindow(d->frame.get());
@@ -153,7 +153,7 @@ void QWebFrame::addToJSWindowObject(const QByteArray &name, QObject *object)
         KJS::Bindings::Instance::createRuntimeObject(KJS::Bindings::Instance::QtLanguage,
                                                      object, root);
 
-      window->put(window->globalExec(), KJS::Identifier(name.constData()), runtimeObject);
+      window->put(window->globalExec(), KJS::Identifier((const KJS::UChar *) name.constData(), name.length()), runtimeObject);
 }