File indexing completed on 2024-04-28 05:34:17

0001 // SPDX-FileCopyrightText: 2018 Daniel Vrátil <dvratil@kde.org>
0002 //
0003 // SPDX-License-Identifier: LGPL-2.1-or-later
0004 
0005 #include "plasmapassplugin.h"
0006 #include "passwordfiltermodel.h"
0007 #include "passwordprovider.h"
0008 #include "otpprovider.h"
0009 #include "passwordsmodel.h"
0010 #include "passwordsortproxymodel.h"
0011 
0012 #include <QJSEngine>
0013 #include <QQmlContext>
0014 #include <QQmlEngine>
0015 
0016 void PlasmaPassPlugin::registerTypes(const char *uri)
0017 {
0018     Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.private.plasmapass"));
0019 
0020     qmlRegisterType<PlasmaPass::PasswordsModel>(uri, 1, 0, "PasswordsModel");
0021     qmlRegisterType<PlasmaPass::PasswordSortProxyModel>(uri, 1, 0, "PasswordSortProxyModel");
0022     qmlRegisterType<PlasmaPass::PasswordFilterModel>(uri, 1, 0, "PasswordFilterModel");
0023     qmlRegisterUncreatableType<PlasmaPass::ProviderBase>(uri, 1, 0, "ProviderBase", QString());
0024     qmlRegisterUncreatableType<PlasmaPass::PasswordProvider>(uri, 1, 0, "PasswordProvider", QString());
0025     qmlRegisterUncreatableType<PlasmaPass::OTPProvider>(uri, 1, 0, "OTPProvider", QString());
0026 
0027     qmlProtectModule("org.kde.plasma.private.plasmapass", 1);
0028 }
0029 
0030 #include "moc_plasmapassplugin.cpp"