win32 KLockFile implementation

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Mon Jul 23 07:38:59 BST 2007


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 :)

Christian
-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail




More information about the kde-core-devel mailing list