Created attachment 146289 [details] Uncompiled source code This isn't really a bug, but we have a problem with trying to add a functionality to plasma-pa, allowing you to hide audio devices from the applet. What we have done so far is implementing a button into the settings that sets a property for the audio device. The problem occurs in trying to filter out devices with the hidden property. We are setting the property in the code from the system settings, but we need the information about it in the code of the audio applet. We thought of creating a config file, in which we specify the audio devices that should be hidden, that will be read by the code of the applet. Therefore, C++ is needed due to QML and JS not being able to create, write and read files. Unfortunately, we can not figure out how the C++ is implemented in the preexisting code, because it isn't done in the usual way. Does anyone know more about it and can eventually help, or does anyone have a better idea than that? We have attached the uncompiled source code (including our changes). In the compiled version, the C++ is gone and only the QML is left. We are open and grateful for every suggestion. Thanks in advance!
I don't really understand what parts you changed. Could you attach a diff file with the changed, that makes it easier to look at. The src/qml directory contains the org.kde.plasma.private.volume QML import which you can use from the KCM and applet to do C++ things
Created attachment 146328 [details] Updated source code (with diff file)
Not sure why the diff approach was suggested, but I don't any diffs in the archive either. Why don't you just register at KDE's GitLab instance https://invent.kde.org/plasma/plasma-pa, fork the repo, and send a patch there?
(In reply to Nicolas Fella from comment #1) > I don't really understand what parts you changed. Could you attach a diff > file with the changed, that makes it easier to look at. > > The src/qml directory contains the org.kde.plasma.private.volume QML import > which you can use from the KCM and applet to do C++ things First of all, thank you for answering this fast... We are sorry that we forgot to tell where the changes are. We only made some changes, that are important for this question, in src/kcm/package/contents/ui/main.qml and src/kcm/package/contents/ui/DeviceListItem.qml. I have now also included the original files together with some diff files. But back to the problem. Can you really just import the source code in the top of the QML code? As far as I thought, you need something like a project file, in which you are specifying the import name, version and all this stuff. Since we could neither find a project file, nor the C++ in the compiled version, we got a little bit confused by it... We will try it out and tell you if it works. Thank you for your kind help!
(In reply to ratijas from comment #3) > Not sure why the diff approach was suggested, but I don't any diffs in the > archive either. Why don't you just register at KDE's GitLab instance > https://invent.kde.org/plasma/plasma-pa, fork the repo, and send a patch > there? You can find the diff files in src/kcm/package/contents/ui/
Bugzilla really isn't the best place for this, as no bug is being reported here. I would recommend posting the work as a merge request at https://invent.kde.org/plasma/plasma-pa/-/merge_requests/ and asking for help there. Alternatively, the #kde-devel Matrix room may be a good source of realtime assistance.