+2008-03-13 Simon Hausmann <hausmann@webkit.org>
+
+ Fix the Qt build.
+
+ * bridge/qt/qt_instance.cpp:
+ (KJS::Bindings::QtInstance::getQtInstance):
+ (KJS::Bindings::QtInstance::getRuntimeObject):
+ * bridge/qt/qt_instance.h:
+ (KJS::Bindings::QtInstance::create):
+ * bridge/qt/qt_runtime.cpp:
+ (KJS::Bindings::convertQVariantToValue):
+ (KJS::Bindings::QtConnectionObject::execute):
+ * page/qt/FrameQt.cpp:
+ (WebCore::Frame::createScriptInstanceForWidget):
+
2008-03-12 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
foreach(QtInstance* instance, cachedInstances.values(o)) {
if (instance->rootObject() == rootObject)
- return instance.get();
+ return instance;
}
RefPtr<QtInstance> ret = adoptRef(new QtInstance(o, rootObject));
JSObject* ret = cachedObjects.value(instance.get());
if (!ret) {
ret = new QtRuntimeObjectImp(instance);
- cachedObjects.insert(ret->getInternalInstance(), ret);
+ cachedObjects.insert(instance.get(), ret);
}
return ret;
}
class QtInstance : public Instance
{
public:
+ static PassRefPtr<QtInstance> create(QObject *instance, PassRefPtr<RootObject> rootObject)
+ {
+ return adoptRef(new QtInstance(instance, rootObject));
+ }
+
~QtInstance ();
virtual Class* getClass() const;
if (type == QMetaType::QObjectStar || type == QMetaType::QWidgetStar) {
QObject* obj = variant.value<QObject*>();
- return Instance::createRuntimeObject(Instance::QtLanguage, obj, root);
+ return Instance::createRuntimeObject(QtInstance::create(obj, root));
}
if (type == QMetaType::QVariantMap) {
if (m_funcObject->inherits(&FunctionImp::info)) {
FunctionImp* fimp = static_cast<FunctionImp*>(m_funcObject.get());
- JSObject* qt_sender = Instance::createRuntimeObject(Instance::QtLanguage, sender(), ro);
+ JSObject* qt_sender = Instance::createRuntimeObject(QtInstance::create(sender(), ro));
JSObject* wrapper = new JSObject();
wrapper->put(exec, "__qt_sender__", qt_sender);
ScopeChain oldsc = fimp->scope();
#include "kjs_proxy.h"
#include "TypingCommand.h"
#include "JSLock.h"
+#include "qt_instance.h"
#include "runtime_root.h"
#include "runtime.h"
#include "JSDOMWindow.h"
QWidget* nativeWidget = widget->nativeWidget();
if (!nativeWidget)
return 0;
- return KJS::Bindings::Instance::createBindingForLanguageInstance(KJS::Bindings::Instance::QtLanguage,
- nativeWidget,
- bindingRootObject());
+ return KJS::Bindings::QtInstance::create(nativeWidget, bindingRootObject());
}
void Frame::clearPlatformScriptObjects()
#include "runtime.h"
#include "runtime_root.h"
#include "JSDOMWindow.h"
+#include "qt_instance.h"
#include "kjs_proxy.h"
#include "kjs_binding.h"
#include "ExecState.h"
}
KJS::JSObject *runtimeObject =
- KJS::Bindings::Instance::createRuntimeObject(KJS::Bindings::Instance::QtLanguage,
- object, root);
+ KJS::Bindings::Instance::createRuntimeObject(KJS::Bindings::QtInstance::create(object, root));
window->put(window->globalExec(), KJS::Identifier((const UChar *) name.constData(), name.length()), runtimeObject);
}
+2008-03-13 Simon Hausmann <hausmann@webkit.org>
+
+ Fix the Qt build.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::addToJSWindowObject):
+
2008-03-12 Simon Hausmann <hausmann@webkit.org>
Fix compilation against Qt 4.3