KcoreAddons

David Faure faure at kde.org
Fri Oct 21 11:04:35 UTC 2011


On Friday 21 October 2011 12:36:27 Oswald Buddenhagen wrote:
> On Fri, Oct 21, 2011 at 11:22:42AM +0200, David Faure wrote:
> > Yes, truncated writes were exactly what I was thinking about, and the
> > whole reason for putting this into QFile. I'm not really sure I
> > understand the setLatchErrors() API idea though. Can't QFile "remember
> > that there was an error" in all cases, and QSaveFile asks it, and
> > other users might not, end of story? What's the setter for?
> 
> two reasons:
> - setting the error code involves translating a string. of course that's
>   minor, and it would be possible to actually delay it (at the cost of
>   some complexity)
> - more importantly, i don't want any followup writes to get through once
>   an error was noted (imagine disk space becomes available again - then
>   you get a file with stuff missing in the middle. that's not important
>   for the savefile case (it would just discard the temp file anyway),
>   but the mode could be used for something else, too) 

I see.

>   - that's why i called it "latch"

I don't really understand the relation...

"
The noun latch has 2 senses (no senses from tagged texts)
                                        
1. latch, door latch -- (spring-loaded doorlock that can only be opened from 
the outside with a key)
2. latch -- (catch for fastening a door or gate; a bar that can be lowered or 
slid into a groove)

Overview of verb latch

The verb latch has 1 sense (first 1 from tagged texts)
                                           
1. (2) latch -- (fasten with a latch; "latch the door")
"

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).



More information about the Kde-frameworks-devel mailing list