From 79d04aa9e3e9aa84d7378260519f9e9a6759dc41 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Fri, 9 Jul 2021 19:24:15 +0200 Subject: Add QtPdf to cmake build Port QtPdf to Qt6: * QtPdf,QtPdfWidgets,QtPdfQuick libs * QtPdfQuickPlugin, QtPdfPlugin (imageformat) plugins * widget and quick examples * qtpdf tests To fit gn cmake integration and new repo layout code is a bit reshuffled. Compared to qmke build following features are not ported yet: * ios fat libs * qtbase 3rdparty static dependencies WebEngine build can be skipped with setting QT_FEATURE_qtwebengine_build=OFF Note this patch needs follow up for 6.2 branch to disable qtpdf builds by default, since this should not part of qt 6.2 release. Pick-to: 6.2 Task-number: QTBUG-95353 Change-Id: I4dd9f3934bdd478fb6d2fa686074a24d91f09953 Reviewed-by: Allan Sandfeld Jensen --- src/pdf/quick/plugin.cpp | 103 ----------------------------------------------- 1 file changed, 103 deletions(-) delete mode 100644 src/pdf/quick/plugin.cpp (limited to 'src/pdf/quick/plugin.cpp') diff --git a/src/pdf/quick/plugin.cpp b/src/pdf/quick/plugin.cpp deleted file mode 100644 index b082fcb4a..000000000 --- a/src/pdf/quick/plugin.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2020 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 -#include -#include -#include -#include "qquickpdfdocument_p.h" -#include "qquickpdflinkmodel_p.h" -#include "qquickpdfnavigationstack_p.h" -#include "qquickpdfsearchmodel_p.h" -#include "qquickpdfselection_p.h" -#include "qquicktableviewextra_p.h" - -QT_BEGIN_NAMESPACE - -/*! - \qmlmodule QtQuick.Pdf 5.15 - \title Qt Quick PDF QML Types - \ingroup qmlmodules - \brief Provides QML types for handling PDF documents. - - This QML module contains types for handling PDF documents. - - To use the types in this module, import the module with the following line: - - \code - import QtQuick.Pdf 5.15 - \endcode -*/ - -class QtQuick2PdfPlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) - -public: - QtQuick2PdfPlugin() : QQmlExtensionPlugin() { } - - void initializeEngine(QQmlEngine *engine, const char *uri) override { - Q_UNUSED(uri); -#ifdef QT_STATIC - Q_UNUSED(engine); -#else - engine->addImportPath(QStringLiteral("qrc:/")); -#endif - } - - void registerTypes(const char *uri) override { - Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Pdf")); - - // Register the latest version, even if there are no new types or new revisions for existing types yet. - qmlRegisterModule(uri, 2, QT_VERSION_MINOR); - - qmlRegisterType(uri, 5, 15, "PdfDocument"); - qmlRegisterType(uri, 5, 15, "PdfLinkModel"); - qmlRegisterType(uri, 5, 15, "PdfNavigationStack"); - qmlRegisterType(uri, 5, 15, "PdfSearchModel"); - qmlRegisterType(uri, 5, 15, "PdfSelection"); - qmlRegisterType(uri, 5, 15, "TableViewExtra"); - - qmlRegisterType(QUrl("qrc:/qt-project.org/qtpdf/qml/PdfPageView.qml"), uri, 5, 15, "PdfPageView"); - qmlRegisterType(QUrl("qrc:/qt-project.org/qtpdf/qml/PdfMultiPageView.qml"), uri, 5, 15, "PdfMultiPageView"); - qmlRegisterType(QUrl("qrc:/qt-project.org/qtpdf/qml/PdfScrollablePageView.qml"), uri, 5, 15, "PdfScrollablePageView"); - } -}; - -QT_END_NAMESPACE - -#include "plugin.moc" -- cgit v1.2.3