From 0856c656623d5bfd4338abbb5c5329139434b81a Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Tue, 17 Aug 2021 13:43:32 +0200 Subject: Hide unneeded Quick C++ APIs They are not supposed to be a part of public Quick API Change-Id: Ib04ea022192d0eec559c28a48bc87fabda932564 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit e264ac67505312a352d55a35b11192d60375f63a) Reviewed-by: Qt Cherry-pick Bot --- src/webenginequick/CMakeLists.txt | 2 +- src/webenginequick/api/qquickwebengineaction_p.h | 2 +- src/webenginequick/api/qquickwebengineprofile.cpp | 2 +- .../api/qquickwebenginescriptcollection.cpp | 2 +- .../api/qquickwebenginescriptcollection.h | 85 ---------------------- .../api/qquickwebenginescriptcollection_p.h | 85 ++++++++++++++++++++++ src/webenginequick/api/qquickwebengineview.cpp | 2 +- 7 files changed, 90 insertions(+), 90 deletions(-) delete mode 100644 src/webenginequick/api/qquickwebenginescriptcollection.h create mode 100644 src/webenginequick/api/qquickwebenginescriptcollection_p.h (limited to 'src') diff --git a/src/webenginequick/CMakeLists.txt b/src/webenginequick/CMakeLists.txt index 5e56cf53f..7fd84c0a4 100644 --- a/src/webenginequick/CMakeLists.txt +++ b/src/webenginequick/CMakeLists.txt @@ -23,7 +23,7 @@ qt_internal_add_qml_module(WebEngineQuick api/qquickwebenginefaviconprovider_p_p.h api/qquickwebenginenewviewrequest.cpp api/qquickwebenginenewviewrequest_p.h api/qquickwebengineprofile.cpp api/qquickwebengineprofile.h api/qquickwebengineprofile_p.h - api/qquickwebenginescriptcollection.cpp api/qquickwebenginescriptcollection.h + api/qquickwebenginescriptcollection.cpp api/qquickwebenginescriptcollection_p.h api/qquickwebenginesettings.cpp api/qquickwebenginesettings_p.h api/qquickwebenginesingleton.cpp api/qquickwebenginesingleton_p.h api/qquickwebenginetouchhandleprovider.cpp diff --git a/src/webenginequick/api/qquickwebengineaction_p.h b/src/webenginequick/api/qquickwebengineaction_p.h index 5cb9e64d5..225803d86 100644 --- a/src/webenginequick/api/qquickwebengineaction_p.h +++ b/src/webenginequick/api/qquickwebengineaction_p.h @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE class QQuickWebEngineActionPrivate; -class Q_WEBENGINEQUICK_EXPORT QQuickWebEngineAction : public QObject +class Q_WEBENGINEQUICK_PRIVATE_EXPORT QQuickWebEngineAction : public QObject { Q_OBJECT Q_PROPERTY(QString text READ text CONSTANT FINAL) diff --git a/src/webenginequick/api/qquickwebengineprofile.cpp b/src/webenginequick/api/qquickwebengineprofile.cpp index 3917730df..6944de95f 100644 --- a/src/webenginequick/api/qquickwebengineprofile.cpp +++ b/src/webenginequick/api/qquickwebengineprofile.cpp @@ -41,7 +41,7 @@ #include "qquickwebengineprofile_p.h" #include "qquickwebenginedownloadrequest_p.h" #include "qquickwebenginesettings_p.h" -#include "qquickwebenginescriptcollection.h" +#include "qquickwebenginescriptcollection_p.h" #include "qquickwebengineview_p_p.h" #include "profile_adapter.h" diff --git a/src/webenginequick/api/qquickwebenginescriptcollection.cpp b/src/webenginequick/api/qquickwebenginescriptcollection.cpp index 6de9287c9..cc1cfb2fa 100644 --- a/src/webenginequick/api/qquickwebenginescriptcollection.cpp +++ b/src/webenginequick/api/qquickwebenginescriptcollection.cpp @@ -37,7 +37,7 @@ ** ****************************************************************************/ -#include "qquickwebenginescriptcollection.h" +#include "qquickwebenginescriptcollection_p.h" #include "qwebenginescriptcollection.h" #include #include diff --git a/src/webenginequick/api/qquickwebenginescriptcollection.h b/src/webenginequick/api/qquickwebenginescriptcollection.h deleted file mode 100644 index f7210302a..000000000 --- a/src/webenginequick/api/qquickwebenginescriptcollection.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://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.LGPL3 included in the -** 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-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQUICKWEBENGINESCRIPTCOLLECTION_H -#define QQUICKWEBENGINESCRIPTCOLLECTION_H - -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE -class QWebEngineScriptCollection; - -class Q_WEBENGINEQUICK_EXPORT QQuickWebEngineScriptCollection : public QObject -{ - Q_OBJECT -public: - Q_PROPERTY(QJSValue collection READ collection WRITE setCollection NOTIFY collectionChanged) - ~QQuickWebEngineScriptCollection(); - - Q_INVOKABLE bool contains(const QWebEngineScript &value) const; - Q_INVOKABLE QList find(const QString &name) const; - Q_INVOKABLE void insert(const QWebEngineScript &); - Q_INVOKABLE void insert(const QList &list); - Q_INVOKABLE bool remove(const QWebEngineScript &); - Q_INVOKABLE void clear(); - - QJSValue collection() const; - void setCollection(const QJSValue &scripts); - -Q_SIGNALS: - void collectionChanged(); - -private: - Q_DISABLE_COPY(QQuickWebEngineScriptCollection) - QQuickWebEngineScriptCollection(QWebEngineScriptCollection *d); - QScopedPointer d; - friend class QQuickWebEngineProfilePrivate; - friend class QQuickWebEngineViewPrivate; -}; - -QT_END_NAMESPACE - -Q_DECLARE_METATYPE(QQuickWebEngineScriptCollection *) - -#endif // QWEBENGINESCRIPTCOLLECTION_H diff --git a/src/webenginequick/api/qquickwebenginescriptcollection_p.h b/src/webenginequick/api/qquickwebenginescriptcollection_p.h new file mode 100644 index 000000000..8ba6d1536 --- /dev/null +++ b/src/webenginequick/api/qquickwebenginescriptcollection_p.h @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://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.LGPL3 included in the +** 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-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QQUICKWEBENGINESCRIPTCOLLECTION_H +#define QQUICKWEBENGINESCRIPTCOLLECTION_H + +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE +class QWebEngineScriptCollection; + +class Q_WEBENGINEQUICK_PRIVATE_EXPORT QQuickWebEngineScriptCollection : public QObject +{ + Q_OBJECT +public: + Q_PROPERTY(QJSValue collection READ collection WRITE setCollection NOTIFY collectionChanged) + ~QQuickWebEngineScriptCollection(); + + Q_INVOKABLE bool contains(const QWebEngineScript &value) const; + Q_INVOKABLE QList find(const QString &name) const; + Q_INVOKABLE void insert(const QWebEngineScript &); + Q_INVOKABLE void insert(const QList &list); + Q_INVOKABLE bool remove(const QWebEngineScript &); + Q_INVOKABLE void clear(); + + QJSValue collection() const; + void setCollection(const QJSValue &scripts); + +Q_SIGNALS: + void collectionChanged(); + +private: + Q_DISABLE_COPY(QQuickWebEngineScriptCollection) + QQuickWebEngineScriptCollection(QWebEngineScriptCollection *d); + QScopedPointer d; + friend class QQuickWebEngineProfilePrivate; + friend class QQuickWebEngineViewPrivate; +}; + +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QQuickWebEngineScriptCollection *) + +#endif // QWEBENGINESCRIPTCOLLECTION_H diff --git a/src/webenginequick/api/qquickwebengineview.cpp b/src/webenginequick/api/qquickwebengineview.cpp index 97592806d..22dea9121 100644 --- a/src/webenginequick/api/qquickwebengineview.cpp +++ b/src/webenginequick/api/qquickwebengineview.cpp @@ -45,7 +45,7 @@ #include "qquickwebenginenewviewrequest_p.h" #include "qquickwebengineprofile.h" #include "qquickwebengineprofile_p.h" -#include "qquickwebenginescriptcollection.h" +#include "qquickwebenginescriptcollection_p.h" #include "qquickwebenginesettings_p.h" #include "qquickwebenginetouchhandleprovider_p_p.h" #include "qquickwebengineview_p.h" -- cgit v1.2.3