On Monday, December 14, 2015 20:46:54 kdea wrote: > Hi. One week ago I asked a question at forum.kde.org, but nobody responded, > so I'm now trying here in the mail list, please redirect me to the > appropiate list if this one is not the correct one. I'm copying the > question... > Hi, I'm creating a QML plasmoid that will write data to a file in disk. I > have searched a lot, and it seems that it is not possible with a pure QML > plasmoid. Web pages say that the only way to do it is by adding C++.
Correct. > The problem with adding C++ is that, as I understand, the plasmoid will have > to be compiled, so I will get some binary files that won't work in all > Linux distributions. In other words, the plasmoid will be less portable: I > will have to create a different file for each Linux distribution before ...and for each architecture as well. > posting the plasmoid to kde-apps.org, or the user will have to download the > source code and compile it for his/her distribution. It is a mess. > I think that file I/O should be possible from a pure QML plasmoid. It is a > core functionality for a high percentage of plasmoids. If you make it > difficult (by requiring the C++ mess), less programmers will create > plasmoids, so less plasmoids will be created. > In fact, file I/O was possible in kde4 from a pure javascript plasmoid, by > using the "Local IO" library: > https://techbase.kde.org/Development/Tutorials/Plasma4/JavaScript/API-Local > IO > I really would like to listen that file I/O is possible from a pure QML > plasmoid in kde5. Or at least that developers are already working on a kde > library to make it possible. I'm very reluctant to add generic file I/O to our QML API, as that is going to make it very hard to secure it later on. We haven't redone the file I/O portions for that reason. Perhaps you could tell us about your exact use case, maybe we're able to suggest a better solution than to offer a generic file I/O API. (Often, there are already solutions for a given purpose.) > (I didn't know if I should post it at "Brainstorm" forum or here, but I > wanted to ask first) _______________________________________________ This list if fine for this question. Cheers, -- sebas Sebastian Kügler | http://vizZzion.org | http://kde.org _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel