diff options
author | Laszlo Papp <lpapp@kde.org> | 2013-11-06 07:04:22 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-06 08:54:01 +0100 |
commit | ed974e0b6cfda1b6b2ac33161ccf2db42b68c710 (patch) | |
tree | 40dfe560176f6967e227c10ffedce844d503df22 /dist | |
parent | 26458aef426cde967433035d2af0ab244db3aec0 (diff) | |
download | qtserialport-ed974e0b6cfda1b6b2ac33161ccf2db42b68c710.tar.gz |
Replace the home-grown QTtyLocker with QLockFile
This can be more widely adopted later, and not just for the Linux backend. It
would be more than a few-liner change for stable, so this change change is kept
minimal (of course apart from the big file integration).
The only big problem with QLockFile currently is that we cannot change the file
name on the fly as it seems, just for construction. Even the copy constructor
and assignment operators are private. It means the class currently seems to be
non-eligible for QtSerialPort needs where it is necessary to change for open
anytime, and be accessible by open/serial for the before and after read/write
session for the same file name.
Also, I had to get rid of the QTemporary file internals because we cannot have
access to the internal engine with Qt 4. I also had to make a small thread class
for the protected msleep in QThread for Qt 4.
There was a small improvement for the hidden dependency problem with
gethostname. That was also sent to QtCore proper. Also, the windows backend for
the QLockFile class is not copied for simplicity. It would not be used as of
now.
There is also a short convenience around QLockFile established to handle
system-wide lock file paths. There is also some error handling added if the lock
directory paths are not readable or writable. This will end users identify the
problems like on Android.
Tested on Archlinux with Qt 4 and then 5.
Task-number: QTBUG-34474
Change-Id: I7adf29527c01ad331d3eeff5ae4c5a4113bde083
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Diffstat (limited to 'dist')
-rw-r--r-- | dist/changes-5.2.0 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dist/changes-5.2.0 b/dist/changes-5.2.0 index 239a9a3..76360f8 100644 --- a/dist/changes-5.2.0 +++ b/dist/changes-5.2.0 @@ -107,3 +107,7 @@ warning now if it is used. - Support has been added for the hard-coded device enumeration backend to get information. Android uarts such as /dev/ttyHS* (High speed UART) and /dev/ttyHSL* (Low speed UART) are supported by that backend. + +- [QTBUG-34474] Replace the internal QTtyLocker with QLockFile from QtCore and a +small convenience on top of it to comply with the locking directories lockdev +also uses. |