File indexing completed on 2024-11-24 05:00:27

0001 /*
0002     SPDX-FileCopyrightText: 2012 Marco Martin <mart@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "trashplugin.h"
0008 #include "dirmodel.h"
0009 #include "trash.h"
0010 
0011 #include <QQmlEngine>
0012 
0013 static QObject *trash_singletonProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
0014 {
0015     Q_UNUSED(engine)
0016     Q_UNUSED(scriptEngine)
0017     return new Trash();
0018 }
0019 
0020 void TrashPrivatePlugin::registerTypes(const char *uri)
0021 {
0022     Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.private.trash"));
0023     qmlRegisterType<DirModel>(uri, 1, 0, "DirModel");
0024     qmlRegisterSingletonType<Trash>(uri, 1, 0, "Trash", trash_singletonProvider);
0025 }