diff --git a/components/mobileshell/mobileshellplugin.cpp b/components/mobileshell/mobileshellplugin.cpp index 9476ed7a..377b1c2d 100644 --- a/components/mobileshell/mobileshellplugin.cpp +++ b/components/mobileshell/mobileshellplugin.cpp @@ -62,7 +62,7 @@ void MobileShellPlugin::registerTypes(const char *uri) // /dataproviders qmlRegisterSingletonType(resolvePath("dataproviders/AudioInfo.qml"), uri, 1, 0, "AudioInfo"); qmlRegisterSingletonType(resolvePath("dataproviders/BatteryInfo.qml"), uri, 1, 0, "BatteryInfo"); - qmlRegisterType(resolvePath("dataproviders/BluetoothInfo.qml"), uri, 1, 0, "BluetoothInfo"); + qmlRegisterSingletonType(resolvePath("dataproviders/BluetoothInfo.qml"), uri, 1, 0, "BluetoothInfo"); qmlRegisterType(resolvePath("dataproviders/SignalStrengthInfo.qml"), uri, 1, 0, "SignalStrengthInfo"); // /homescreen diff --git a/components/mobileshell/qml/dataproviders/BluetoothInfo.qml b/components/mobileshell/qml/dataproviders/BluetoothInfo.qml index 422230d1..48f1e40b 100644 --- a/components/mobileshell/qml/dataproviders/BluetoothInfo.qml +++ b/components/mobileshell/qml/dataproviders/BluetoothInfo.qml @@ -6,6 +6,8 @@ SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ +pragma Singleton + import QtQuick 2.2 import QtQuick.Layouts 1.4 import org.kde.bluezqt 1.0 as BluezQt diff --git a/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml b/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml index 91f344da..2928c48a 100644 --- a/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml +++ b/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml @@ -10,16 +10,12 @@ import QtQuick import QtQuick.Layouts import org.kde.kirigami 2.20 as Kirigami -import org.kde.bluezqt as BluezQt - -import "../../dataproviders" as DataProviders +import org.kde.plasma.private.mobileshell 1.0 as MobileShell Kirigami.Icon { id: connectionIcon - readonly property var provider: DataProviders.BluetoothInfo {} + source: "network-bluetooth" - source: "network-bluetooth" // provider.icon - - visible: provider.isVisible + visible: MobileShell.BluetoothInfo.isVisible }