win32 KLockFile implementation

Ralf Habacker ralf.habacker at freenet.de
Mon Jul 23 09:17:53 BST 2007


Christian Ehrlicher schrieb:
> Von: Ralf Habacker <ralf.habacker at freenet.de>
>   
>> Christian Ehrlicher schrieb:
>>     
>>> Ralf Habacker schrieb:
>>>       
>>>> Hi,
>>>>
>>>> appended is a win32 implementation of the KLockFile class. using the
>>>> recent KLockfile api.
>>>> The implementation uses CreateFile() without shared access rights  to
>>>> detect if the specific file is opened by another process. Stale lock
>>>> file handling is also implemented.
>>>>
>>>> I've also added a second KLockFile instance to testLock() of the
>>>> testcase to check if locking really works.
>>>>
>>>> If there are no objectivies I would check this in and would
>>>> - rename the recent klockfile.cpp to klockfile_unix.cpp and
>>>> - remove all win32 stuff from the unix only file.
>>>>
>>>>         
>>> Please use the unicode versions of CreateFile/DeleteFile/...
>>>       
>> which means to use QString instead of QByteArray for the filename and to
>> convert the string with QString::unicode().
>>
>>     
> Yes - use QString as long as possible (We should not use the ansi version just because linux does not support unicode here...). But do not use QString::unicode() but QString::utf16() instead :)
>
>   
fixed, thanks I'm going to check this in.

Ralf



> Christian
>   





More information about the kde-core-devel mailing list