mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
This allows us in the future to use mobileshell without having the WindowUtil singleton loaded (which does a bunch of wayland calls that aren't necessary for most applications).
17 lines
516 B
C++
17 lines
516 B
C++
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "windowplugin.h"
|
|
#include "windowutil.h"
|
|
|
|
#include <QQmlContext>
|
|
#include <QQuickItem>
|
|
|
|
void WindowPlugin::registerTypes(const char *uri)
|
|
{
|
|
Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.private.mobileshell.windowplugin"));
|
|
|
|
qmlRegisterSingletonType<WindowUtil>(uri, 1, 0, "WindowUtil", [](QQmlEngine *, QJSEngine *) -> QObject * {
|
|
return WindowUtil::instance();
|
|
});
|
|
}
|