[Ktechlab-devel] kdevplatform and document types

Zoltan Padrah zoltan.padrah at gmail.com
Sun Jul 18 18:59:23 UTC 2010


Replying to myself:

if an "untitled", empty document is created, then it has the mimetype
"application/octet-stream"; if it doesn't have extension, it will be
"text/plain", and only if it has the .circuit extension, then it will be
recognized as a circuit.

So, as a workaround, in the test case a new, empty temporary file is
created, with the .circuit extension, and that file is opened. This way a
new document is obtained. Looks like a little hacking, but now it works :D

Creating new circuits in ktechlab could be implemented this way: when a new
circuit should be created, open a new file in a temporary directory, and set
a flag indicating that the current document isn't really saved. When the
document is saved, write the file to its final location.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/ktechlab-devel/attachments/20100718/aae50ae8/attachment.html>


More information about the Ktechlab-devel mailing list