QML and IOJOb

Michał "rysiek" Woźniak rysiek at fwioo.pl
Sat Nov 2 20:20:56 UTC 2013


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.

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

Any pointers much appreciated.

-- 
Pozdrawiam
Michał "rysiek" Woźniak

Fundacja Wolnego i Otwartego Oprogramowania
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 316 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20131102/7aadec0a/attachment.sig>


More information about the Plasma-devel mailing list