summaryrefslogtreecommitdiffstats
path: root/src/imports/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/webkit')
-rw-r--r--src/imports/webkit/plugin.cpp2
-rw-r--r--src/imports/webkit/qdeclarativewebview.cpp8
-rw-r--r--src/imports/webkit/qdeclarativewebview_p.h7
-rw-r--r--src/imports/webkit/qdeclarativewebview_p_p.h4
-rw-r--r--src/imports/webkit/webkit.pro10
-rw-r--r--src/imports/webkit/webkitqmlplugin_export.h53
6 files changed, 13 insertions, 71 deletions
diff --git a/src/imports/webkit/plugin.cpp b/src/imports/webkit/plugin.cpp
index 799fe9e..e3d73ec 100644
--- a/src/imports/webkit/plugin.cpp
+++ b/src/imports/webkit/plugin.cpp
@@ -54,7 +54,7 @@ public:
virtual void registerTypes(const char *uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("org.webkit"));
- QML_REGISTER_NOCREATE_TYPE(QDeclarativeWebSettings);
+ qmlRegisterType<QDeclarativeWebSettings>();
qmlRegisterType<QDeclarativeWebView>(uri,1,0,"WebView");
}
};
diff --git a/src/imports/webkit/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp
index d78ba28..f8b2b88 100644
--- a/src/imports/webkit/qdeclarativewebview.cpp
+++ b/src/imports/webkit/qdeclarativewebview.cpp
@@ -80,6 +80,7 @@ public:
rendering(true)
{
}
+ void focusChanged(bool);
QUrl url; // page url might be different if it has not loaded yet
QWebPage *page;
@@ -378,11 +379,12 @@ QVariant QDeclarativeWebView::evaluateJavaScript(const QString &scriptSource)
return this->page()->mainFrame()->evaluateJavaScript(scriptSource);
}
-void QDeclarativeWebView::focusChanged(bool hasFocus)
+void QDeclarativeWebViewPrivate::focusChanged(bool hasFocus)
{
+ Q_Q(QDeclarativeWebView);
QFocusEvent e(hasFocus ? QEvent::FocusIn : QEvent::FocusOut);
- page()->event(&e);
- QDeclarativeItem::focusChanged(hasFocus);
+ q->page()->event(&e);
+ QDeclarativeItemPrivate::focusChanged(hasFocus);
}
void QDeclarativeWebView::initialLayout()
diff --git a/src/imports/webkit/qdeclarativewebview_p.h b/src/imports/webkit/qdeclarativewebview_p.h
index 145e74b..36b18a6 100644
--- a/src/imports/webkit/qdeclarativewebview_p.h
+++ b/src/imports/webkit/qdeclarativewebview_p.h
@@ -42,8 +42,6 @@
#ifndef QDECLARATIVEWEBVIEW_H
#define QDECLARATIVEWEBVIEW_H
-#include "webkitqmlplugin_export.h"
-
#include <private/qdeclarativepainteditem_p.h>
#include <QtGui/QAction>
@@ -64,7 +62,7 @@ class QDeclarativeWebViewPrivate;
class QNetworkRequest;
class QDeclarativeWebView;
-class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebPage : public QWebPage
+class QDeclarativeWebPage : public QWebPage
{
Q_OBJECT
public:
@@ -88,7 +86,7 @@ class QDeclarativeWebViewAttached;
//### TODO: browser plugins
-class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebView : public QDeclarativePaintedItem
+class QDeclarativeWebView : public QDeclarativePaintedItem
{
Q_OBJECT
@@ -239,7 +237,6 @@ protected:
void keyReleaseEvent(QKeyEvent* event);
virtual void geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry);
- virtual void focusChanged(bool);
virtual bool sceneEvent(QEvent *event);
QDeclarativeWebView *createWindow(QWebPage::WebWindowType type);
diff --git a/src/imports/webkit/qdeclarativewebview_p_p.h b/src/imports/webkit/qdeclarativewebview_p_p.h
index 3ad9e9a..258b472 100644
--- a/src/imports/webkit/qdeclarativewebview_p_p.h
+++ b/src/imports/webkit/qdeclarativewebview_p_p.h
@@ -42,8 +42,6 @@
#ifndef QDECLARATIVEWEBVIEW_P_H
#define QDECLARATIVEWEBVIEW_P_H
-#include "webkitqmlplugin_export.h"
-
#include <qdeclarative.h>
#include <QtWebKit/QWebPage>
@@ -54,7 +52,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebSettings : public QObject {
+class QDeclarativeWebSettings : public QObject {
Q_OBJECT
Q_PROPERTY(QString standardFontFamily READ standardFontFamily WRITE setStandardFontFamily)
diff --git a/src/imports/webkit/webkit.pro b/src/imports/webkit/webkit.pro
index fdc12cc..ef08efe 100644
--- a/src/imports/webkit/webkit.pro
+++ b/src/imports/webkit/webkit.pro
@@ -3,17 +3,15 @@ TARGETPATH = org/webkit
include(../qimportbase.pri)
QT += webkit declarative
-DEFINES += WEBKITQMLPLUGIN_EXPORTS
SOURCES += qdeclarativewebview.cpp plugin.cpp
HEADERS += qdeclarativewebview_p.h \
- qdeclarativewebview_p_p.h \
- webkitqmlplugin_export.h
+ qdeclarativewebview_p_p.h
-QTDIR_build:DESTDIR = $$TARGETPATH
-target.path = $$TARGETPATH
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH
+target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-qmldir.files += $$QT_BUILD_TREE/imports/org/webkit/qmldir
+qmldir.files += $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
INSTALLS += target qmldir
diff --git a/src/imports/webkit/webkitqmlplugin_export.h b/src/imports/webkit/webkitqmlplugin_export.h
deleted file mode 100644
index 974fd24..0000000
--- a/src/imports/webkit/webkitqmlplugin_export.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef WEBKITQMLPLUGIN_EXPORT_H
-#define WEBKITQMLPLUGIN_EXPORT_H
-
-#include <QtCore/QtGlobal>
-
-#if defined WEBKITQMLPLUGIN_EXPORTS
-# define WEBKITQMLPLUGIN_EXPORT Q_DECL_EXPORT
-#else
-# define WEBKITQMLPLUGIN_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // WEBKITQMLPLUGIN_EXPORT_H