Warning, /plasma/plasma-mobile/components/mobileshell/qml/volumeosd/VolumeOSDProviderLoader.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
0002 // SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0003 
0004 import QtQuick
0005 import org.kde.plasma.private.mobileshell as MobileShell
0006 
0007 pragma Singleton
0008 
0009 /**
0010  * This wraps the VolumeOSDProvider component so that we can avoid loading side
0011  * effects from imports (since this is a singleton and initialized immediately on import).
0012  */
0013 Loader {
0014     id: root
0015     sourceComponent: Component {
0016         MobileShell.VolumeOSDProvider {}
0017     }
0018 
0019     // WARNING: only call this load from within the plasmashell process, because
0020     // multiple bindings of the shortcut may break it entirely (hardware volume keys)
0021     function load() {
0022         root.active = true;
0023     }
0024 }
0025