mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
We currently create several instances of the plasma-nm objects over the shell. Use a single singleton to avoid having to load it multiple times.
15 lines
No EOL
468 B
QML
15 lines
No EOL
468 B
QML
// SPDX-FileCopyrightText: 2025 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
pragma Singleton
|
|
|
|
import QtQuick
|
|
|
|
import org.kde.plasma.networkmanagement as PlasmaNM
|
|
|
|
QtObject {
|
|
// Initialization of PlasmaNM.Handler is quite heavy, initialize it once for the shell as a singleton.
|
|
readonly property PlasmaNM.Handler handler: PlasmaNM.Handler {}
|
|
|
|
readonly property PlasmaNM.WirelessStatus wirelessStatus: PlasmaNM.WirelessStatus {}
|
|
} |