File: plasmapassplugin.cpp

package info (click to toggle)
plasma-pass 1.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 504 kB
  • sloc: cpp: 1,316; xml: 28; makefile: 2; sh: 1
file content (30 lines) | stat: -rw-r--r-- 1,166 bytes parent folder | download | duplicates (2)
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
// SPDX-FileCopyrightText: 2018 Daniel Vrátil <dvratil@kde.org>
//
// SPDX-License-Identifier: LGPL-2.1-or-later

#include "plasmapassplugin.h"
#include "passwordfiltermodel.h"
#include "passwordprovider.h"
#include "otpprovider.h"
#include "passwordsmodel.h"
#include "passwordsortproxymodel.h"

#include <QJSEngine>
#include <QQmlContext>
#include <QQmlEngine>

void PlasmaPassPlugin::registerTypes(const char *uri)
{
    Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.private.plasmapass"));

    qmlRegisterType<PlasmaPass::PasswordsModel>(uri, 1, 0, "PasswordsModel");
    qmlRegisterType<PlasmaPass::PasswordSortProxyModel>(uri, 1, 0, "PasswordSortProxyModel");
    qmlRegisterType<PlasmaPass::PasswordFilterModel>(uri, 1, 0, "PasswordFilterModel");
    qmlRegisterUncreatableType<PlasmaPass::ProviderBase>(uri, 1, 0, "ProviderBase", QString());
    qmlRegisterUncreatableType<PlasmaPass::PasswordProvider>(uri, 1, 0, "PasswordProvider", QString());
    qmlRegisterUncreatableType<PlasmaPass::OTPProvider>(uri, 1, 0, "OTPProvider", QString());

    qmlProtectModule("org.kde.plasma.private.plasmapass", 1);
}

#include "moc_plasmapassplugin.cpp"