From 24a695673cc53b224dd3fac44e924a41f8ea20a5 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 3 Mar 2010 14:22:45 +1000 Subject: Fix settings (was not exported type). --- src/imports/webkit/plugin.cpp | 1 + src/imports/webkit/qdeclarativewebview.cpp | 2 +- src/imports/webkit/qdeclarativewebview_p.h | 5 +++-- src/imports/webkit/qdeclarativewebview_p_p.h | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/imports/webkit/plugin.cpp b/src/imports/webkit/plugin.cpp index 2f6205d..799fe9e 100644 --- a/src/imports/webkit/plugin.cpp +++ b/src/imports/webkit/plugin.cpp @@ -54,6 +54,7 @@ public: virtual void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("org.webkit")); + QML_REGISTER_NOCREATE_TYPE(QDeclarativeWebSettings); qmlRegisterType(uri,1,0,"WebView"); } }; diff --git a/src/imports/webkit/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp index 733ac86..d78ba28 100644 --- a/src/imports/webkit/qdeclarativewebview.cpp +++ b/src/imports/webkit/qdeclarativewebview.cpp @@ -931,7 +931,7 @@ QWebPage *QDeclarativeWebView::page() const } \endqml */ -QObject *QDeclarativeWebView::settingsObject() const +QDeclarativeWebSettings *QDeclarativeWebView::settingsObject() const { Q_D(const QDeclarativeWebView); d->settings.s = page()->settings(); diff --git a/src/imports/webkit/qdeclarativewebview_p.h b/src/imports/webkit/qdeclarativewebview_p.h index 5efc3b5..145e74b 100644 --- a/src/imports/webkit/qdeclarativewebview_p.h +++ b/src/imports/webkit/qdeclarativewebview_p.h @@ -59,6 +59,7 @@ class QWebSettings; QT_BEGIN_NAMESPACE QT_MODULE(Declarative) +class QDeclarativeWebSettings; class QDeclarativeWebViewPrivate; class QNetworkRequest; class QDeclarativeWebView; @@ -113,7 +114,7 @@ class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebView : public QDeclarativePaintedIte Q_PROPERTY(QAction* forward READ forwardAction CONSTANT) Q_PROPERTY(QAction* stop READ stopAction CONSTANT) - Q_PROPERTY(QObject* settings READ settingsObject CONSTANT) + Q_PROPERTY(QDeclarativeWebSettings* settings READ settingsObject CONSTANT) Q_PROPERTY(QDeclarativeListProperty javaScriptWindowObjects READ javaScriptWindowObjects CONSTANT) @@ -170,7 +171,7 @@ public: QWebHistory *history() const; QWebSettings *settings() const; - QObject *settingsObject() const; + QDeclarativeWebSettings *settingsObject() const; bool renderingEnabled() const; void setRenderingEnabled(bool); diff --git a/src/imports/webkit/qdeclarativewebview_p_p.h b/src/imports/webkit/qdeclarativewebview_p_p.h index 258b472..3ad9e9a 100644 --- a/src/imports/webkit/qdeclarativewebview_p_p.h +++ b/src/imports/webkit/qdeclarativewebview_p_p.h @@ -42,6 +42,8 @@ #ifndef QDECLARATIVEWEBVIEW_P_H #define QDECLARATIVEWEBVIEW_P_H +#include "webkitqmlplugin_export.h" + #include #include @@ -52,7 +54,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QDeclarativeWebSettings : public QObject { +class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebSettings : public QObject { Q_OBJECT Q_PROPERTY(QString standardFontFamily READ standardFontFamily WRITE setStandardFontFamily) -- cgit v0.12