File indexing completed on 2024-05-05 05:30:29

0001 /*
0002 SPDX-FileCopyrightText: 2017 Martin Gräßlin <mgraesslin@kde.org>
0003 
0004 SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 #include "../greeter/pamauthenticator.h"
0007 #include <KUser>
0008 #include <QCommandLineParser>
0009 #include <QGuiApplication>
0010 #include <QQmlApplicationEngine>
0011 #include <QQmlContext>
0012 
0013 int main(int argc, char *argv[])
0014 {
0015     QGuiApplication app(argc, argv);
0016     QCommandLineParser parser;
0017     parser.addHelpOption();
0018     parser.process(app);
0019     PamAuthenticator authenticator("kde", KUser().loginName());
0020 
0021     QQmlApplicationEngine engine;
0022     engine.rootContext()->setContextProperty(QStringLiteral("authenticator"), &authenticator);
0023     engine.load(QUrl::fromLocalFile(QStringLiteral(QML_FILE)));
0024     return app.exec();
0025 }