win32 KLockFile implementation

Ralf Habacker ralf.habacker at freenet.de
Mon Jul 23 07:34:43 BST 2007


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().

Is there any problem to add a new kdebug.areas code for KLockFile  say

151        kdecore (KLockFile)

Ralf






More information about the kde-core-devel mailing list