| 1 | // Copyright (C) 2017-2018 Red Hat, Inc |
|---|---|
| 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 <qpa/qplatformthemeplugin.h> |
| 5 | #include "qxdgdesktopportaltheme.h" |
| 6 | |
| 7 | QT_BEGIN_NAMESPACE |
| 8 | |
| 9 | using namespace Qt::StringLiterals; |
| 10 | |
| 11 | class QXdgDesktopPortalThemePlugin : public QPlatformThemePlugin |
| 12 | { |
| 13 | Q_OBJECT |
| 14 | Q_PLUGIN_METADATA(IID QPlatformThemeFactoryInterface_iid FILE "xdgdesktopportal.json") |
| 15 | |
| 16 | public: |
| 17 | QPlatformTheme *create(const QString &key, const QStringList ¶ms) override; |
| 18 | }; |
| 19 | |
| 20 | QPlatformTheme *QXdgDesktopPortalThemePlugin::create(const QString &key, const QStringList ¶ms) |
| 21 | { |
| 22 | Q_UNUSED(params); |
| 23 | return QXdgDesktopPortalTheme::isXdgPlugin(key) ? new QXdgDesktopPortalTheme : nullptr; |
| 24 | } |
| 25 | |
| 26 | QT_END_NAMESPACE |
| 27 | |
| 28 | #include "main.moc" |
| 29 |
