[Plasmoids] Can I write to file from a pure QML plasmoid?

kdea k.dea at mail.com
Tue Dec 15 20:32:47 UTC 2015


On Monday, December 14, 2015 21:54:02 Sebastian Kügler wrote:

> 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.

Personally I don't see much difference between a standard application running in a window and a QML application running in the panel. Why the first one should be able to do File I/O and the second one not? Why running in the panel is less secure than running in a window?

On the other hand, I don't see any advantage in having to add C++ to do file I/O. A plasmoid isn't more secure if I do file I/O with C++ than if I could do file I/O with a QML library. I only see disadvantages in the C++ option:

- The developer will have to learn C++.
- The developer will have to learn how to communicate QML with C++.
- The developer will have to compile the plasmoid for each distribution/architecture. Or the user will have to download the source code and compile it.

> 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.)

Well, the plasmoid will be a surprise :-), so I would prefer to keep the details secret until I publish it. I can only say that it requires to read and write from/to files in disk, it is a core feature.

Thank you


More information about the Plasma-devel mailing list