File indexing completed on 2024-07-21 03:40:37

0001 /*
0002     kiconengineplugin.cpp: Qt plugin providing the ability to create a KIconEngine
0003 
0004     This file is part of the KDE project, module kdeui.
0005     SPDX-FileCopyrightText: 2018 Fabian Vogt <fabian@ritter-vogt.de>
0006 
0007     SPDX-License-Identifier: LGPL-2.0-only
0008 */
0009 
0010 #include <QIconEnginePlugin>
0011 
0012 #include <KIconEngine>
0013 #include <KIconLoader>
0014 
0015 QT_BEGIN_NAMESPACE
0016 
0017 class KIconEnginePlugin : public QIconEnginePlugin
0018 {
0019     Q_OBJECT
0020     Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QIconEngineFactoryInterface" FILE "kiconengineplugin.json")
0021 
0022 public:
0023     QIconEngine *create(const QString &file) override
0024     {
0025         return new KIconEngine(file, KIconLoader::global());
0026     }
0027 };
0028 
0029 QT_END_NAMESPACE
0030 
0031 #include "kiconengineplugin.moc"