summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/imageformats/imageformats.pro2
-rw-r--r--src/plugins/imageformats/pdf/main.cpp74
-rw-r--r--src/plugins/imageformats/pdf/pdf.json4
-rw-r--r--src/plugins/imageformats/pdf/pdf.pro11
-rw-r--r--src/plugins/imageformats/pdf/qpdfiohandler.cpp239
-rw-r--r--src/plugins/imageformats/pdf/qpdfiohandler_p.h88
-rw-r--r--src/plugins/plugins.pro3
-rw-r--r--src/plugins/qwebengineview/images/qwebengineview.pngbin1473 -> 0 bytes
-rw-r--r--src/plugins/qwebengineview/qwebengineview.pro11
-rw-r--r--src/plugins/qwebengineview/qwebengineview_plugin.cpp137
-rw-r--r--src/plugins/qwebengineview/qwebengineview_plugin.h107
-rw-r--r--src/plugins/qwebengineview/qwebengineview_plugin.qrc5
12 files changed, 0 insertions, 681 deletions
diff --git a/src/plugins/imageformats/imageformats.pro b/src/plugins/imageformats/imageformats.pro
deleted file mode 100644
index c3b9cb3a4..000000000
--- a/src/plugins/imageformats/imageformats.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS += pdf
diff --git a/src/plugins/imageformats/pdf/main.cpp b/src/plugins/imageformats/pdf/main.cpp
deleted file mode 100644
index b4d59353c..000000000
--- a/src/plugins/imageformats/pdf/main.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtPDF module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 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
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.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 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
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qpdfiohandler_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QPdfPlugin : public QImageIOPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QImageIOHandlerFactoryInterface_iid FILE "pdf.json")
-
-public:
- Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
- QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
-};
-
-QImageIOPlugin::Capabilities QPdfPlugin::capabilities(QIODevice *device, const QByteArray &format) const
-{
- if (format == "pdf")
- return Capabilities(CanRead);
- if (!format.isEmpty())
- return {};
-
- Capabilities cap;
- if (device->isReadable() && QPdfIOHandler::canRead(device))
- cap |= CanRead;
- return cap;
-}
-
-QImageIOHandler *QPdfPlugin::create(QIODevice *device, const QByteArray &format) const
-{
- QPdfIOHandler *hand = new QPdfIOHandler();
- hand->setDevice(device);
- hand->setFormat(format);
- return hand;
-}
-
-QT_END_NAMESPACE
-
-#include "main.moc"
diff --git a/src/plugins/imageformats/pdf/pdf.json b/src/plugins/imageformats/pdf/pdf.json
deleted file mode 100644
index 1f5268ca1..000000000
--- a/src/plugins/imageformats/pdf/pdf.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Keys": [ "pdf" ],
- "MimeTypes": [ "application/pdf" ]
-}
diff --git a/src/plugins/imageformats/pdf/pdf.pro b/src/plugins/imageformats/pdf/pdf.pro
deleted file mode 100644
index b820ae7d5..000000000
--- a/src/plugins/imageformats/pdf/pdf.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TARGET = qpdf
-
-PLUGIN_TYPE = imageformats
-PLUGIN_EXTENDS = pdf
-PLUGIN_CLASS_NAME = QPdfPlugin
-load(qt_plugin)
-
-HEADERS += qpdfiohandler_p.h
-SOURCES += main.cpp \
- qpdfiohandler.cpp
-QT += pdf
diff --git a/src/plugins/imageformats/pdf/qpdfiohandler.cpp b/src/plugins/imageformats/pdf/qpdfiohandler.cpp
deleted file mode 100644
index 98e4f4663..000000000
--- a/src/plugins/imageformats/pdf/qpdfiohandler.cpp
+++ /dev/null
@@ -1,239 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtPDF module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 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
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.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 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
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qpdfiohandler_p.h"
-#include <QLoggingCategory>
-#include <QPainter>
-
-QT_BEGIN_NAMESPACE
-
-Q_LOGGING_CATEGORY(qLcPdf, "qt.imageformat.pdf")
-
-QPdfIOHandler::QPdfIOHandler()
-{
-}
-
-bool QPdfIOHandler::canRead() const
-{
- if (!device())
- return false;
- if (m_loaded)
- return true;
- if (QPdfIOHandler::canRead(device())) {
- setFormat("pdf");
- return true;
- }
- return false;
-}
-
-bool QPdfIOHandler::canRead(QIODevice *device)
-{
- char buf[6];
- device->peek(buf, 6);
- return (!qstrncmp(buf, "%PDF-", 5) || Q_UNLIKELY(!qstrncmp(buf, "\012%PDF-", 6)));
-}
-
-int QPdfIOHandler::currentImageNumber() const
-{
- return m_page;
-}
-
-QRect QPdfIOHandler::currentImageRect() const
-{
- return QRect(QPoint(0, 0), m_doc.pageSize(m_page).toSize());
-}
-
-int QPdfIOHandler::imageCount() const
-{
- int ret = 0;
- if (const_cast<QPdfIOHandler *>(this)->load(device()))
- ret = m_doc.pageCount();
- qCDebug(qLcPdf) << "imageCount" << ret;
- return ret;
-}
-
-bool QPdfIOHandler::read(QImage *image)
-{
- if (load(device())) {
- if (m_page >= m_doc.pageCount())
- return false;
- if (m_page < 0)
- m_page = 0;
- const bool xform = (m_clipRect.isValid() || m_scaledSize.isValid() || m_scaledClipRect.isValid());
- QSize pageSize = m_doc.pageSize(m_page).toSize();
- QSize finalSize = pageSize;
- QRectF bounds;
- if (xform && !finalSize.isEmpty()) {
- bounds = QRectF(QPointF(0,0), QSizeF(finalSize));
- QPoint tr1, tr2;
- QSizeF sc(1, 1);
- if (m_clipRect.isValid()) {
- tr1 = -m_clipRect.topLeft();
- finalSize = m_clipRect.size();
- }
- if (m_scaledSize.isValid()) {
- sc = QSizeF(qreal(m_scaledSize.width()) / finalSize.width(),
- qreal(m_scaledSize.height()) / finalSize.height());
- finalSize = m_scaledSize;
- pageSize = m_scaledSize;
- }
- if (m_scaledClipRect.isValid()) {
- tr2 = -m_scaledClipRect.topLeft();
- finalSize = m_scaledClipRect.size();
- }
- QTransform t;
- t.translate(tr2.x(), tr2.y());
- t.scale(sc.width(), sc.height());
- t.translate(tr1.x(), tr1.y());
- bounds = t.mapRect(bounds);
- }
- qCDebug(qLcPdf) << Q_FUNC_INFO << m_page << finalSize;
- if (image->size() != finalSize || !image->reinterpretAsFormat(QImage::Format_ARGB32_Premultiplied)) {
- *image = QImage(finalSize, QImage::Format_ARGB32_Premultiplied);
- if (!finalSize.isEmpty() && image->isNull()) {
- // avoid QTBUG-68229
- qWarning("QPdfIOHandler: QImage allocation failed (size %i x %i)", finalSize.width(), finalSize.height());
- return false;
- }
- }
- if (!finalSize.isEmpty()) {
- QPdfDocumentRenderOptions options;
- if (m_scaledClipRect.isValid())
- options.setScaledClipRect(m_scaledClipRect);
- options.setScaledSize(pageSize);
- image->fill(m_backColor.rgba());
- QPainter p(image);
- QImage pageImage = m_doc.render(m_page, finalSize, options);
- p.drawImage(0, 0, pageImage);
- p.end();
- }
- return true;
- }
-
- return false;
-}
-
-QVariant QPdfIOHandler::option(ImageOption option) const
-{
- switch (option) {
- case ImageFormat:
- return QImage::Format_ARGB32_Premultiplied;
- case Size:
- const_cast<QPdfIOHandler *>(this)->load(device());
- return m_doc.pageSize(qMax(0, m_page));
- case ClipRect:
- return m_clipRect;
- case ScaledSize:
- return m_scaledSize;
- case ScaledClipRect:
- return m_scaledClipRect;
- case BackgroundColor:
- return m_backColor;
- case Name:
- return m_doc.metaData(QPdfDocument::Title);
- default:
- break;
- }
- return QVariant();
-}
-
-void QPdfIOHandler::setOption(ImageOption option, const QVariant & value)
-{
- switch (option) {
- case ClipRect:
- m_clipRect = value.toRect();
- break;
- case ScaledSize:
- m_scaledSize = value.toSize();
- break;
- case ScaledClipRect:
- m_scaledClipRect = value.toRect();
- break;
- case BackgroundColor:
- m_backColor = value.value<QColor>();
- break;
- default:
- break;
- }
-}
-
-bool QPdfIOHandler::supportsOption(ImageOption option) const
-{
- switch (option)
- {
- case ImageFormat:
- case Size:
- case ClipRect:
- case ScaledSize:
- case ScaledClipRect:
- case BackgroundColor:
- case Name:
- return true;
- default:
- break;
- }
- return false;
-}
-
-bool QPdfIOHandler::jumpToImage(int frame)
-{
- qCDebug(qLcPdf) << Q_FUNC_INFO << frame;
- if (frame < 0 || frame >= m_doc.pageCount())
- return false;
- m_page = frame;
- return true;
-}
-
-bool QPdfIOHandler::jumpToNextImage()
-{
- return jumpToImage(m_page + 1);
-}
-
-bool QPdfIOHandler::load(QIODevice *device)
-{
- if (m_loaded)
- return true;
- if (format().isEmpty())
- if (!canRead())
- return false;
-
- m_doc.load(device);
- m_loaded = (m_doc.error() == QPdfDocument::DocumentError::NoError);
-
- return m_loaded;
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/imageformats/pdf/qpdfiohandler_p.h b/src/plugins/imageformats/pdf/qpdfiohandler_p.h
deleted file mode 100644
index 99a91154c..000000000
--- a/src/plugins/imageformats/pdf/qpdfiohandler_p.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtPDF module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 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
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.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 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
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPDFIOHANDLER_H
-#define QPDFIOHANDLER_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtGui/qimageiohandler.h>
-#include <QtPdf/QPdfDocument>
-
-QT_BEGIN_NAMESPACE
-
-class QPdfIOHandler : public QImageIOHandler
-{
-public:
- QPdfIOHandler();
- bool canRead() const override;
- static bool canRead(QIODevice *device);
- int currentImageNumber() const override;
- QRect currentImageRect() const override;
- int imageCount() const override;
- bool read(QImage *image) override;
- QVariant option(ImageOption option) const override;
- void setOption(ImageOption option, const QVariant & value) override;
- bool supportsOption(ImageOption option) const override;
- bool jumpToImage(int frame) override;
- bool jumpToNextImage() override;
-
-private:
- bool load(QIODevice *device);
-
-private:
- QPdfDocument m_doc;
- int m_page = -1;
-
- QRect m_clipRect;
- QSize m_scaledSize;
- QRect m_scaledClipRect;
- QColor m_backColor = Qt::transparent;
- bool m_loaded = false;
-};
-
-QT_END_NAMESPACE
-
-#endif // QPDFIOHANDLER_H
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
deleted file mode 100644
index 50181aa19..000000000
--- a/src/plugins/plugins.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-TEMPLATE = subdirs
-qtHaveModule(webenginewidgets): qtHaveModule(designer): SUBDIRS += qwebengineview
-qtHaveModule(pdf): qtConfig(imageformatplugin): SUBDIRS += imageformats
diff --git a/src/plugins/qwebengineview/images/qwebengineview.png b/src/plugins/qwebengineview/images/qwebengineview.png
deleted file mode 100644
index 01a0920c9..000000000
--- a/src/plugins/qwebengineview/images/qwebengineview.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qwebengineview/qwebengineview.pro b/src/plugins/qwebengineview/qwebengineview.pro
deleted file mode 100644
index c18b6fe94..000000000
--- a/src/plugins/qwebengineview/qwebengineview.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TARGET = qwebengineview
-QT += designer webenginewidgets
-
-PLUGIN_CLASS_NAME = QWebEngineViewPlugin
-PLUGIN_TYPE = designer
-CONFIG += tool_plugin
-load(qt_plugin)
-
-SOURCES += qwebengineview_plugin.cpp
-HEADERS += qwebengineview_plugin.h
-RESOURCES += qwebengineview_plugin.qrc
diff --git a/src/plugins/qwebengineview/qwebengineview_plugin.cpp b/src/plugins/qwebengineview/qwebengineview_plugin.cpp
deleted file mode 100644
index dff041800..000000000
--- a/src/plugins/qwebengineview/qwebengineview_plugin.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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$
-**
-****************************************************************************/
-
-#include "qwebengineview_plugin.h"
-
-#include <QtDesigner/QExtensionFactory>
-#include <QtDesigner/QExtensionManager>
-
-#include <QtCore/qplugin.h>
-#include <QWebEngineView>
-
-QT_BEGIN_NAMESPACE
-
-static const char toolTipC[] =
- QT_TRANSLATE_NOOP(QWebEngineViewPlugin,
- "A widget for displaying a web page, from the Qt WebEngineWidgets module");
-
-QWebEngineViewPlugin::QWebEngineViewPlugin(QObject *parent) :
- QObject(parent),
- m_initialized(false)
-{
-}
-
-QString QWebEngineViewPlugin::name() const
-{
- return QStringLiteral("QWebEngineView");
-}
-
-QString QWebEngineViewPlugin::group() const
-{
- return QStringLiteral("Display Widgets");
-}
-
-QString QWebEngineViewPlugin::toolTip() const
-{
- return tr(toolTipC);
-}
-
-QString QWebEngineViewPlugin::whatsThis() const
-{
- return tr(toolTipC);
-}
-
-QString QWebEngineViewPlugin::includeFile() const
-{
- return QStringLiteral("<QtWebEngineWidgets/QWebEngineView>");
-}
-
-QIcon QWebEngineViewPlugin::icon() const
-{
- return QIcon(QStringLiteral(":/qt-project.org/qwebengineview/images/qwebengineview.png"));
-}
-
-bool QWebEngineViewPlugin::isContainer() const
-{
- return false;
-}
-
-QWidget *QWebEngineViewPlugin::createWidget(QWidget *parent)
-{
- if (parent)
- return new QWebEngineView(parent);
- return new fake::QWebEngineView;
-}
-
-bool QWebEngineViewPlugin::isInitialized() const
-{
- return m_initialized;
-}
-
-void QWebEngineViewPlugin::initialize(QDesignerFormEditorInterface * /*core*/)
-{
- if (m_initialized)
- return;
-
- m_initialized = true;
-}
-
-QString QWebEngineViewPlugin::domXml() const
-{
- return QStringLiteral("\
- <ui language=\"c++\">\
- <widget class=\"QWebEngineView\" name=\"webEngineView\">\
- <property name=\"url\">\
- <url>\
- <string>about:blank</string>\
- </url>\
- </property>\
- <property name=\"geometry\">\
- <rect>\
- <x>0</x>\
- <y>0</y>\
- <width>300</width>\
- <height>200</height>\
- </rect>\
- </property>\
- </widget>\
- </ui>");
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/qwebengineview/qwebengineview_plugin.h b/src/plugins/qwebengineview/qwebengineview_plugin.h
deleted file mode 100644
index dd7d38a72..000000000
--- a/src/plugins/qwebengineview/qwebengineview_plugin.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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 QWEBENGINEVIEW_PLUGIN_H
-#define QWEBENGINEVIEW_PLUGIN_H
-
-#include <QtUiPlugin/QDesignerCustomWidgetInterface>
-#include <QtWidgets/QWidget>
-#include <QtGui/QIcon>
-#include <QtCore/QUrl>
-
-QT_BEGIN_NAMESPACE
-
-namespace fake {
-// A lightweight "fake" QWebEngineView class that is returned when Qt Designer
-// queries the default property values by calling
-// QDesignerCustomWidgetInterface::createWidget() with 0 parent, preventing
-// crashes during QWebEngine initialization (QTBUG-53984).
-// The property list needs to be kept in sync with QWebEngineView.
-class QWebEngineView : public QWidget {
- Q_OBJECT
- Q_PROPERTY(QString title READ title)
- Q_PROPERTY(QUrl url READ url WRITE setUrl) // Designable
- Q_PROPERTY(QUrl iconUrl READ iconUrl)
- Q_PROPERTY(QIcon icon READ icon)
- Q_PROPERTY(QString selectedText READ selectedText)
- Q_PROPERTY(bool hasSelection READ hasSelection)
- Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor) // Designable
-
-public:
- explicit QWebEngineView(QWidget *parent = Q_NULLPTR) : QWidget(parent) {}
-
- QString title() const { return QString(); }
- QUrl url() const { return QUrl(); }
- void setUrl(const QUrl &) {}
- QUrl iconUrl() const { return QUrl(); }
- QIcon icon() const { return QIcon(); }
- QString selectedText() { return QString(); }
- bool hasSelection() { return false; }
- qreal zoomFactor() const { return 1; }
- void setZoomFactor(qreal) {}
-};
-} // namespace fake
-
-class QWebEngineViewPlugin: public QObject, public QDesignerCustomWidgetInterface
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface")
- Q_INTERFACES(QDesignerCustomWidgetInterface)
-public:
- explicit QWebEngineViewPlugin(QObject *parent = Q_NULLPTR);
-
- QString name() const override;
- QString group() const override;
- QString toolTip() const override;
- QString whatsThis() const override;
- QString includeFile() const override;
- QIcon icon() const override;
- bool isContainer() const override;
- QWidget *createWidget(QWidget *parent) override;
- bool isInitialized() const override;
- void initialize(QDesignerFormEditorInterface *core) override;
- QString domXml() const override;
-
-private:
- bool m_initialized;
-};
-
-QT_END_NAMESPACE
-
-#endif // QWEBENGINEVIEW_PLUGIN_H
diff --git a/src/plugins/qwebengineview/qwebengineview_plugin.qrc b/src/plugins/qwebengineview/qwebengineview_plugin.qrc
deleted file mode 100644
index 181625c48..000000000
--- a/src/plugins/qwebengineview/qwebengineview_plugin.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/qt-project.org/qwebengineview">
- <file>images/qwebengineview.png</file>
- </qresource>
-</RCC>