summaryrefslogtreecommitdiffstats
path: root/lib/quick/plugin
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-11-15 14:21:17 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-18 14:53:08 +0100
commitec7b2ee70a8b2db7fb87f50671a001ddd54697b0 (patch)
tree788f01a500667ddff3fc485d4be27a57b4e881e2 /lib/quick/plugin
parent175cc28b9716f7f4f10eeee53fc541e556abe22e (diff)
Add an intermediate Qt5WebEngine module library.
Make the WebEngine QtQuick plubin library a library only that fetches the API privatly from the official module. This will allow an experimental plugin library to also have access to the API classes, which it currently can't since the plugins aren't deployed the same way as module to <prefix>/lib. The module currently only export classes privately but the plan is to make this library the official linking point of entry for applications along with the Qt5WebEngineWidgets module. The WebEngineCore library could eventyally be merged into this module library if we can get gyp to play well with qmake. Change-Id: I5edb60b412e213b59f791a7b8df9f28c295502de Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'lib/quick/plugin')
-rw-r--r--lib/quick/plugin/plugin.cpp64
-rw-r--r--lib/quick/plugin/plugin.pro13
-rw-r--r--lib/quick/plugin/qmldir3
3 files changed, 80 insertions, 0 deletions
diff --git a/lib/quick/plugin/plugin.cpp b/lib/quick/plugin/plugin.cpp
new file mode 100644
index 000000000..5efde6dd8
--- /dev/null
+++ b/lib/quick/plugin/plugin.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQml/qqmlextensionplugin.h>
+
+#include "qquickwebengineview_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QtWebEnginePlugin : public QQmlExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
+public:
+ virtual void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ {
+ Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebEngine"));
+ Q_UNUSED(uri);
+
+ qmlRegisterType<QQuickWebEngineView>(uri, 1, 0, "WebEngineView");
+ }
+};
+
+QT_END_NAMESPACE
+
+#include "plugin.moc"
diff --git a/lib/quick/plugin/plugin.pro b/lib/quick/plugin/plugin.pro
new file mode 100644
index 000000000..93e04f97a
--- /dev/null
+++ b/lib/quick/plugin/plugin.pro
@@ -0,0 +1,13 @@
+CXX_MODULE = qml
+TARGET = qtwebengineplugin
+TARGETPATH = QtWebEngine
+IMPORT_VERSION = 1.0
+
+QT += webengine qml quick
+QT_PRIVATE += webengine-private qml-private quick-private gui-private core-private
+
+INCLUDEPATH += $$QTWEBENGINE_ROOT/lib $$QTWEBENGINE_ROOT/lib/quick
+
+SOURCES = plugin.cpp
+
+load(qml_plugin)
diff --git a/lib/quick/plugin/qmldir b/lib/quick/plugin/qmldir
new file mode 100644
index 000000000..e24f55ed9
--- /dev/null
+++ b/lib/quick/plugin/qmldir
@@ -0,0 +1,3 @@
+module QtWebEngine
+plugin qtwebengineplugin
+typeinfo plugins.qmltypes