QML and IOJOb

Aaron J. Seigo aseigo at kde.org
Sun Nov 3 09:36:35 UTC 2013


On Saturday, November 2, 2013 21:20:56 Michał rysiek Woźniak wrote:
> Hello,
> 
> After a while I came back to a little project of mine, and am trying to add
> loading and saving data from it (a serialised JSON object) from/to a file.
> 
> I am using FileDialog, LocalIO and IOJobs extentions:
> http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API-LocalIO
> http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API-IOJobs
> 
> Two issues I cannot seem to get over:
> 
> 1. Upon reading a file (i.e. in data() signal handler) is there a way to
> check what encoding the file or the data is likely in, and to properly
> handle it? my data is in UTF-8 (of course), but once loaded it is not
> displayed correctly.

encoding is not handled, no.

> 2. Is there anyway at all to actually *write* data out to a file? Cannot
> seem to find it, even though there is a SaveFileDialog().

random access I/O stile write? no. the save dialog is there to give 
destinations to things that do (e.g. http requests)

-- 
Aaron J. Seigo


More information about the Plasma-devel mailing list