File: powermanagementtest.cpp

package info (click to toggle)
kscreenlocker 6.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,328 kB
  • sloc: cpp: 5,698; xml: 88; sh: 30; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 587 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
/*
SPDX-FileCopyrightText: 2016 Martin Gräßlin <mgraesslin@kde.org>

SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "../greeter/powermanagement.h"
#include <QGuiApplication>
#include <QQmlContext>
#include <QQuickView>

int main(int argc, char **argv)
{
    QGuiApplication app(argc, argv);

    QQuickView view;
    view.rootContext()->setContextProperty(QStringLiteral("powerManagement"), PowerManagement::instance());
    view.setSource(QUrl::fromLocalFile(QStringLiteral(QML_PATH)));

    view.show();

    return app.exec();
}