20 #include "dbuslomirisessionservice.h"
21 #include "orientationlock.h"
23 #include <QAbstractItemModel>
24 #include <QDBusConnection>
25 #include <QtQml/qqml.h>
27 static QObject *dbuslomirisessionservice_provider(QQmlEngine *, QJSEngine *)
29 new DBusGnomeSessionManagerDialogWrapper();
30 new DBusGnomeSessionManagerWrapper();
31 new DBusGnomeScreensaverWrapper();
32 new DBusScreensaverWrapper();
36 static QObject *orientationlock_provider(QQmlEngine *, QJSEngine *)
41 void SessionPlugin::registerTypes(
const char *uri)
43 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
44 qmlRegisterAnonymousType<QAbstractItemModel>(uri, 0);
46 qmlRegisterType<QAbstractItemModel>();
49 Q_ASSERT(uri == QLatin1String(
"Lomiri.Session"));
50 qmlRegisterSingletonType<DBusLomiriSessionService>(uri, 0, 1,
"DBusLomiriSessionService", dbuslomirisessionservice_provider);
51 qmlRegisterSingletonType<OrientationLock>(uri, 0, 1,
"OrientationLock", orientationlock_provider);