From kwrite-devel Sat Dec 28 17:02:42 2013 From: David Faure Date: Sat, 28 Dec 2013 17:02:42 +0000 To: kwrite-devel Subject: Re: Saving through KCompressionDevice Message-Id: <2141165.aYITxfpOqO () asterix> X-MARC-Message: https://marc.info/?l=kwrite-devel&m=138825018810743 On Saturday 28 December 2013 17:08:00 David Faure wrote: > On Friday 27 December 2013 22:44:19 Dominik Haumann wrote: > > Hi, > > > > saving a file with Kate compiled from kate.git/frameworks branch still > > leads to data loss: The file is messed up a bit, as if syncing into the > > text stream does not always work correctly. > > > > The attached diff shows such an example: Expected are not changes at all. > > But git diff shows that the file is messed up. > > > > Checking what we write to the QTextStream, it seems that Kate Part writes > > the data correctly in katetextbuffer.cpp function ::save(). > > > > @David: When we switch to simple QFile, this seems to work as expected. > > We don't have a unit test right now. Still: any ideas? > > > > File: > > https://projects.kde.org/projects/kde/applications/kate/repository/revisio > > n > > s/frameworks/entry/part/buffer/katetextbuffer.cpp#L732 > > OK, I was able to write a failing unittest using QTextStream, I'll debug it > now. Fixed! -- David Faure, faure@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 _______________________________________________ KWrite-Devel mailing list KWrite-Devel@kde.org https://mail.kde.org/mailman/listinfo/kwrite-devel