summaryrefslogtreecommitdiffstats
path: root/src/serialport/serialport-lib.pri
Commit message (Collapse)AuthorAgeFilesLines
* Make independent implementation of QSerialPortInfo for OS XDenis Shienkov2014-07-091-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Building in OS X uses some shared code from the serialportinfo_unix.cpp module with the OS X specific code from the serialportinfo_mac.cpp module. Thus, all code of the serialportinfo_unix.cpp module, which not related with the OS X, is shielded by a macro. It adds an excessive garbage for readability in this module and also some confusion in the *.pri file. It makes sense to make implementation of the serialportinfo_mac.cpp module completely independent, that will simplify maintaining of source code. Besides are added tests which can reveal declared but not implemented methods in building, and also to check a correctness of default values at running. Tested build on OS X 10.8.4 with Qt4, an then on Android with Qt5. Change-Id: I67935b64e2b623fb8d4c14d59e1b87f1eac71c3e Reviewed-by: Bernard Pratz <guyzmo+qt@m0g.net> Reviewed-by: Peter Kümmel <syntheticpp@gmx.net> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Move the WinCE implementation into separate moduleDenis Shienkov2014-05-201-8/+11
| | | | | | | | | | | | | | | | | WinCE implementation was mixed a common code with the Win32 implementation that caused some problems with maintenance. More correct decision is moving a common code which was used in *win.cpp into *wince.cpp module without modifications. Now the Win32 and the WinCE implementation are independent from each other. Tested build with Qt5 on "win32-msvc2012" and then with Qt4 on "wincewm50pocket-msvc2008" configurations. Change-Id: I63f687468beffa9a75b534a4fbe536b854b12210 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* use private linkage where appropriateOswald Buddenhagen2014-02-201-4/+4
| | | | | | | Task-number: QTBUG-35781 Change-Id: I24b5ec010525da2c1f1be63996193ac31dcd3808 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Try to load udev at runtime if we do not link against itLaszlo Papp2013-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There was an explicit option previously added into 5.2.0 due to lack of time to implement this runtime resolution properly. The libudev load variable can now be eliminated which also simplifies the packaging. This change also takes care of avoiding the regression by not loading udev at runtime at all for Qt 4. That has always been the case, so there are no regressions there. A TODO comment has been left in the code though about it. The helper free functions cannot be static because they are declared as friend outside that source file. Ideally, we could have a better approach, but that would require more significant refactoring, and such a revamp has to become stable in the 'dev' branch before going into the 'stable' branch. Thereby, this is an acceptable compromise. It does not break binary compatibility either to remove or add friend declarations to a class. The change has been tested on Archlinux (x86_64) with Qt 4 and then 5 using the cenumerator example. The change has been tested both with udev and without that, i.e with sysfs on my Linux system. Change-Id: Ia7d7ecb336c1de1913e1dd60177ae7469e90c329 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Replace the home-grown QTtyLocker with QLockFileLaszlo Papp2013-11-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Respect the configure script run for udevLaszlo Papp2013-10-301-5/+12
| | | | | | | | | | | | | Configure does not currently have an argument for udev, but still: it will try to detect it and if it is available QT_CONFIG contains the "libudev" word. We should respect that for Qt 5. Unfortunate, the configure script is not checking this for Qt 4, so we still need to fall back to pkgconfig for Qt 4. Change-Id: I9e755ee015f4f584e945cb176f1788b6dbac7374 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Add support for loading udev at run-timeLaszlo Papp2013-10-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | QtSerialPort is linked against udev by default if the development files can be detected on the system. The reason for this is that, it is more common to link against udev than loading it at run-time. People will usually use distribution packages where there cannot be inconsistency between different versions, and hence ABI breaks, etc. The relevant LINK_LIBUDEV variable will be set. This can be overridden by defining LOAD_LIBUDEV for qmake: qmake "DEFINES += LOAD_LIBUDEV" -r It is also worth noting that the common code is separated into a private header, and it can be included for either type of libudev usage. There is no need for its user to handle the compile-time linking or run-time loading separately on top of that. Task-number: QTBUG-34329 Change-Id: I45ffaaede2a74498587a6452fbe3fec7eaf83483 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Linux: removed the duplicated linking of libudevDenis Shienkov2013-08-171-4/+0
| | | | | | | | | Existence checking and linking of libudev is already carried out by means of pkgconfig. Change-Id: I5233ab2ce7ed342d95e8ba646b4024c8ad6b8a78 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Use the pkg-config for finding libudev only on UnixLaszlo Papp2013-02-111-4/+6
| | | | | | | | | This is not a critical error, but Windows at least gives some warning about the pkgconfig unavailable. Libudev should be working only on Unix after all. Change-Id: I3ee088f6ae3cc663a9fabe441a2eefa2a23d2f32 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Remove the dash from the global serialport header file nameLaszlo Papp2013-02-081-1/+1
| | | | | | | | | | 1) It is not consistent with the rest in QtSerialPort. 2) Even more importantly, it is not consistent with other Qt Project global files. Change-Id: I9d9262264bc2dbe5acfbce04013d9be08df2b47c Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Rename the TtyLocker class to QTtyLocker as it gets to Qt scopeLaszlo Papp2013-02-071-2/+2
| | | | | Change-Id: I74b90ec2a6cb08a9bc75225e04995a3b05f2c6e9 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Detect the udev installation properly and branch accordinglyLaszlo Papp2013-02-071-1/+6
| | | | | | | | | | This change unbreaks the build when one does not have libudev-dev installed as the dependency is hard coded. However, it should be a soft (optional) dependency and the project even supplies a fallback operation for that. Change-Id: I6072ad54c1d778a79c7f02b68c80bd07eb24e5f4 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Make all the file renames and relevant changesLaszlo Papp2013-01-271-19/+19
| | | | | | | | "git log --follow /path/to/the/file/in/question" can be used, for instance, for the renamed files to get the whole history. Change-Id: I20da087ca88e2c179a6c3232772fa21575e0aa6a Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Call the module QtSerialPort instead of QtAddOnSerialPortLaszlo Papp2013-01-261-1/+1
| | | | | | | | Use the QTSERIALPORT as a term for internal variables as well to remain consistent with the freshly chosen module name. Change-Id: Ia780b105649b39a1eca46702466da5bc31ec5af0 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Updating a project tree for compilation fixingDenis Shienkov2012-11-051-0/+80
For optimization and build correction for Qt4/Qt5 there was a need for unification and modification of a tree of projects. The previous structure of the project didn't meet the changed requirements for Qt5 that led to errors of build and complication of possibility of correction of errors of build. It is necessary to note the main changes: * Removed not used /modules direcrory with all content, because it is autogenerated. * Moved all contents from /src directory to /src/serialport directory. It was necessary for simplification of the qmake commands at building for Qt5 (in particular, there is no need to fill out a module name since it is the name of directory /serialport). * Changed the exported macro defines Q_ADDON_SERIALPORT_EXPORT to Q_SERIALPORT_EXPORT and QT_ADDON_SERIALPORT_LIB to QT_SERIALPORT_LIB. It was necessary for fixing compilation error for unknown reason on Windows and Qt5 when used MSVC compiler. Checked on Windows and Gnu/Linux, also this patch fixes bug: Task-number: QTPLAYGROUND-5 Change-Id: Idc9ba98115d5961a22ae307c0e4034a56f3223b5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>