| 1 | // Copyright (C) 2017 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #include <QtLabsSharedImage/private/qtlabssharedimageglobal_p.h> |
| 5 | #include <QtLabsSharedImage/private/qsharedimageprovider_p.h> |
| 6 | |
| 7 | #include <qqmlextensionplugin.h> |
| 8 | #include <qqmlengine.h> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | class QtQuickSharedImagePlugin : public QQmlEngineExtensionPlugin |
| 13 | { |
| 14 | Q_OBJECT |
| 15 | Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid) |
| 16 | public: |
| 17 | QtQuickSharedImagePlugin(QObject *parent = nullptr) : QQmlEngineExtensionPlugin(parent) |
| 18 | { |
| 19 | volatile auto registration = &qml_register_types_Qt_labs_sharedimage; |
| 20 | Q_UNUSED(registration); |
| 21 | } |
| 22 | |
| 23 | void initializeEngine(QQmlEngine *engine, const char *uri) override |
| 24 | { |
| 25 | Q_UNUSED(uri); |
| 26 | engine->addImageProvider(id: "shared", new SharedImageProvider); |
| 27 | } |
| 28 | }; |
| 29 | |
| 30 | QT_END_NAMESPACE |
| 31 | |
| 32 | #include "qsharedimageplugin.moc" |
| 33 |
