karchive and QSaveFile

Boudewijn Rempt boud at valdyas.org
Tue Mar 28 10:54:47 BST 2017


I'm trying to make Krita use QSaveFile instead of the home-grown
mess of temporary files that get copied over the original file
after saving succeeded. The problem is that Krita, like Calligra,
uses KArchive. And KArchive, even when a KZip is created with
an existing QIODevice, decides on its own to call close(), which
is not allowed with QSaveFile.

I've tried to set KZip's io device to 0 just before closing the
kzip, but that means the zip file doesn't get written correctly.

I'm now wondering whether to hack QSaveFile's close to just not
abort, or add inherits("QSaveFile") checks all over KArchive --
or whether there's a third, better option that I've missed...

-- 
Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org




More information about the kde-core-devel mailing list