File: main.cpp

package info (click to toggle)
dde-qt5integration 5.7.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,528 kB
  • sloc: cpp: 12,089; xml: 154; sh: 13; makefile: 10
file content (38 lines) | stat: -rw-r--r-- 993 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * SPDX-FileCopyrightText: 2017 - 2023 UnionTech Software Technology Co., Ltd.
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */
#include <qpa/qplatformthemeplugin.h>
#include "qdeepintheme.h"

#ifdef XDG_ICON_VERSION_MAR
#include <private/xdgiconloader/xdgiconloader_p.h>
void updateXdgIconSystemTheme()
{
    XdgIconLoader::instance()->updateSystemTheme();
}
#endif

QT_BEGIN_NAMESPACE
class QDeepinThemePlugin : public QPlatformThemePlugin
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID QPlatformThemeFactoryInterface_iid FILE "deepin.json")

public:
    QPlatformTheme *create(const QString &key, const QStringList &params) Q_DECL_OVERRIDE;
};

QPlatformTheme *QDeepinThemePlugin::create(const QString &key, const QStringList &params)
{
    Q_UNUSED(params);
    const QStringList &keys = {QLatin1String(QDeepinTheme::name), QLatin1String("DDE")};
    if (keys.contains(key, Qt::CaseInsensitive))
        return new QDeepinTheme;

    return nullptr;
}

QT_END_NAMESPACE

#include "main.moc"