[Kde-pim] Review Request: Fixing data loss on remote KABC address book resources

Kevin Krammer kevin.krammer at gmx.at
Sat Mar 14 13:00:11 GMT 2009



> On 2009-03-14 05:41:43, Volker Krause wrote:
> > Looks ok to me, no idea about the windows part though.
> 
> Allen Winter wrote:
>     except that we do want it to work on windows. maybe Tobias will take a closer look.  In any event, I don't see anything wrong with this patch.

The problem is that QTemporaryFile::close() does not actually close the file.
So if this is a problem on Windows, something other than K/QTemporaryFile needs to be used. Probably a cache file like KCal's remote resource or not using KIO::NetAccess but KIO::storedPut, in which case the vcards can probably be directly serialized into a QBuffer


- Kevin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/302/#review473
-----------------------------------------------------------


On 2009-03-14 04:58:13, Kevin Krammer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/302/
> -----------------------------------------------------------
> 
> (Updated 2009-03-14 04:58:13)
> 
> 
> Review request for KDE PIM.
> 
> 
> Summary
> -------
> 
> The KABC Resource plugin "net" currently "destroys" the remote file by copying a zero length file to the target location.
> 
> It seems that QTemporaryFile does some internal buffering and data is not written to the filesystem.
> 
> The question is does this work on Windows at all (and do we care)? IIRC a file cannot be opened more than once so the upload will probably fail at sourceFile.open().
> 
> 
> This addresses bug https://bugzilla.novell.com/show_bug.cgi?id=480957.
>     https://bugs.kde.org/show_bug.cgi?id=https://bugzilla.novell.com/show_bug.cgi?id=480957
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdepimlibs/kabc/plugins/net/resourcenet.cpp 938848 
> 
> Diff: http://reviewboard.kde.org/r/302/diff
> 
> 
> Testing
> -------
> 
> Tested with a sftp URL to another local user account and confirmed to work by the reporter of bug in Novell's tracker.
> 
> QTemporaryFile::close() also works, but then one needs to locally store the filename because after close() QTemporaryFile just returns a null string.
> 
> 
> Thanks,
> 
> Kevin
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list