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
|
/*
SPDX-FileCopyrightText: 2017 Martin Gräßlin <mgraesslin@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "../greeter/pamauthenticator.h"
#include <KUser>
#include <QCommandLineParser>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QCommandLineParser parser;
parser.addHelpOption();
parser.process(app);
PamAuthenticator authenticator(QStringLiteral("kde"), KUser().loginName());
QQmlApplicationEngine engine;
engine.rootContext()->setContextProperty(QStringLiteral("authenticator"), &authenticator);
engine.load(QUrl::fromLocalFile(QStringLiteral(QML_FILE)));
return app.exec();
}
|