diff options
Diffstat (limited to 'src/webengine/plugin/experimental/plugin.cpp')
-rw-r--r-- | src/webengine/plugin/experimental/plugin.cpp | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/webengine/plugin/experimental/plugin.cpp b/src/webengine/plugin/experimental/plugin.cpp index 883ebc598..29b5413f4 100644 --- a/src/webengine/plugin/experimental/plugin.cpp +++ b/src/webengine/plugin/experimental/plugin.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtWebEngine module of the Qt Toolkit. ** @@ -10,15 +10,15 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/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 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to +** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** @@ -26,7 +26,7 @@ ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later 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 +** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** @@ -36,19 +36,11 @@ #include <QtQml/qqmlextensionplugin.h> -#include "qquickwebenginehistory_p.h" -#include "qquickwebenginesettings_p.h" -#include "qquickwebenginesingleton_p.h" #include "qquickwebengineview_p.h" #include "qquickwebengineview_p_p.h" QT_BEGIN_NAMESPACE -static QObject *webEngineSingletonProvider(QQmlEngine *, QJSEngine *) -{ - return new QQuickWebEngineSingleton; -} - class QQuickWebEngineViewExperimentalExtension : public QObject { Q_OBJECT Q_PROPERTY(QQuickWebEngineViewExperimental* experimental READ experimental CONSTANT FINAL) @@ -74,13 +66,9 @@ public: QObject::tr("Cannot create a separate instance of WebEngineViewExperimental")); qmlRegisterUncreatableType<QQuickWebEngineViewport>(uri, 1, 0, "WebEngineViewport", QObject::tr("Cannot create a separate instance of WebEngineViewport")); - qmlRegisterUncreatableType<QQuickWebEngineHistory>(uri, 1, 0, "NavigationHistory", - QObject::tr("Cannot create a separate instance of NavigationHistory")); - qmlRegisterUncreatableType<QQuickWebEngineHistoryListModel>(uri, 1, 0, "NavigationHistoryListModel", - QObject::tr("Cannot create a separate instance of NavigationHistory")); - qmlRegisterUncreatableType<QQuickWebEngineSettings>(uri, 1, 0, "WebEngineSettings", - QObject::tr("Cannot create a separate instance of WebEngineSettings")); - qmlRegisterSingletonType<QQuickWebEngineSingleton>(uri, 1, 0, "WebEngine", webEngineSingletonProvider); + + // Use the latest revision of QQuickWebEngineView when importing QtWebEngine.experimental 1.0 + qmlRegisterRevision<QQuickWebEngineView, 1>(uri, 1, 0); } }; |