summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Updating a project tree for compilation fixingDenis Shienkov2012-11-0537-86/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Windows: fix write for Bluetooth serial portsDenis Shienkov2012-10-291-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Bluetooth serial ports (at least from the Microsoft stack) do not support the event EV_TXEMPTY. Therefore, for this reason, the writing to the port was stopped after transmission of the first chunk of data from the internal ring buffer of class. Because further write the chunk of data to the port should be called after triggered EV_TXEMPTY event. The solution is to abandon the EV_TXEMPTY from design in library. Now, for the launch to send of the next chunk of data to the port is the event from write completion overlapped structure. Asynchronous transmission is performed as long as the internal ring buffer is not empty. This solution also reduces the load on the CPU because the deleted event processing for EV_TXEMPTY. Task-number: QTPLAYGROUND-8 Change-Id: Ib4e21824ea783e1fe64ce0fa0be49ef0e69a99a6 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Aleksei Timofeyev <aleksei.timofeyev@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Gnu/Linux: reduce CPU load at write dataDenis Shienkov2012-10-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Previously, the load on the CPU causes a continuous triggered QSocketNotifier::Write of event, even if internal transmitted ring buffer of class SerialPort was empty. This was due to the excess check of conditions for empty transmission queue into driver. I.e. at intensive data transfer when the ring buffer is empty, but drivers queue not yet empty - the condition is not fulfilled and the notification is not switched off. Some relief to the problem is to remove the conditions of a check of the transmission queue of driver. This solution allows to reduce the intensity of the CPU load by 30-40% in depends of intensity of transferred data and data block size. Task-number: QTPLAYGROUND-7 Change-Id: I67f354d09b7f3dd13d46ab42a492524c79f2ce52 Reviewed-by: Daniel Strnad Reviewed-by: Aleksei Timofeyev <aleksei.timofeyev@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Remove QtGUI from library buildThiago A. Correa2012-10-111-0/+1
| | | | | | | Change-Id: I7776c9e805bd4967c1539c94217f180724553e05 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* *nix: Fix lines() methodDenis Shienkov2012-10-091-22/+22
| | | | | | | | | Fixed copy/paste errors into defines of macro bits of lines when getting state of lines. Change-Id: I1774ac5a3a0fea0404dcc15b334a19a8239e6e86 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* *nix: change DTR and RTS directly via TIOCMBIS and TIOCMBICDenis Shienkov2012-10-091-24/+4
| | | | | | | | | | | | | | | | | Earlier change lines DTR/RTS was produced by a long chain of calls: 1. Get state all lines. 2. Overlay the desired mask AND/OR. 3. Setup back resulting state all lines. Now setup or cleanup any from lines DTR or RTS made ​​directly with the commands TIOCMBIS and TIOCMBIC via ioctl() call. PS: Tested on GNU\Linux Change-Id: I8ac1d408751706e590631c0671b292791b8c2585 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Getting info directly from the USB deviceDenis Shienkov2012-10-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Previously, information about the product and the manufacturer of USB device was received from the UDEV database. But UDEV database does not always contain the correct information about the device. This information may be outdated, and it may be absent in the case of "self- made" USB devices. A real example: Many chips/microcontrollers (for example FTDI) can customize settings of USB descriptor: VID, PID, iProduct, iManufacturer etc. So the best solution is to get this information directly from the USB descriptor, i.e. in this case, the information provided by the device. PS: Thanks to Vladimir Kost for the catch. Change-Id: I982c7a1fbd80df58273722de6178b923dae041b2 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Kost Vladimir Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Fixed search for a devices with "usb" subsystemDenis Shienkov2012-10-031-1/+2
| | | | | | | | | | | This patch fixes to obtain detailed information with UDEV for devices that do not have the subsystem "usb-serial", but have a subsystem "usb". For example, this devices such as /dev/ttyACMx. Change-Id: I28ce15caec75e92aac874947b80c037818ec7f1c Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Fix build on WinCEDenis Shienkov2012-09-241-1/+1
| | | | | | | Sha1: I60a9d3671f5c650f26c3add18d9bfc865a190c01 Change-Id: I2899a577b4c42c6f228d0e1d515fcb8e40956bc9 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Do not split into stringlist and then take the first elementLaszlo Papp2012-09-231-1/+1
| | | | | | | | | | | | | | | 1) This is not really useful that way as this could well be done by "section" without establishing a brand new list. More importantly: 2) There is no point in having '.' in there since no serialports contain that on Unix. Testing: Built on Linux, and ran the enumerator example. All fine. Change-Id: I8d5711467b9dc2b8944996a344c55329b6dd9e49 Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Filter the symlinks for the /dev entriesLaszlo Papp2012-09-231-13/+10
| | | | | | | | | | | | | | | | | | | | | There is no serialport device as symlink on Unix and hence it is safe to remove. The explicit isDir() filtering can be eliminated this way. It can be seen very well for the no udev case below that there are no serialport entries with symlinks so the current handling is worse than it could be due to the explicit filtering after the filtering method call. l << QLatin1String("ttyS*") // Standart UART 8250 and etc. << QLatin1String("ttyUSB*") // Usb/serial converters PL2303 and etc. << QLatin1String("ttyACM*") // CDC_ACM converters (i.e. Mobile Phones). << QLatin1String("ttyGS*") // Gadget serial device (i.e. Mobile Phones with gadget serial driver). << QLatin1String("ttyMI*") // MOXA pci/serial converters. << QLatin1String("rfcomm*"); // Bluetooth serial device. l << QLatin1String("cu*"); // Here for other *nix OS. Change-Id: I8f23d9883c80cf6adff3890eef345215cd1133c3 Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Do not use java-style accessor function namesLaszlo Papp2012-09-231-6/+6
| | | | | | | | | | The get cannot just be dropped as that would result a conflict with the portName member variable in the file's source code. On the contrary, it is also more logical to give the "device" prefix instead of just dropping that "get" similarly to the deviceRegistryProperty function name. Change-Id: I910070a75644721139e4bcd1b5920a499c29ebc6 Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Avoid the hard coding of the maximum size for the registry value nameLaszlo Papp2012-09-201-8/+11
| | | | | | | Build test run on Windows XP with Qt 4.7.2. No regressions found. Change-Id: I19fc7a01c1a9b949ed998966210bde325987df9f Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Refactored the SerialPortInfo Win32 codeDenis Shienkov2012-09-172-134/+55
| | | | | | | | | | | | | Optimized and eliminated some static functions and methods, and remove unused include headers and linked Win32 libraries. Previous implementation was too cluttered and redundant, which was implemented out unused code. Now, was cleaned the code and deleted unused parts. Change-Id: I4d12905dd2d1c2916d10a824f49b635cb0adf8d7 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Eliminate the left-over serialportengine include for MacDenis Shienkov2012-09-112-1/+4
| | | | | | | | | Task-number: QTPLAYGROUND-4 Change-Id: I3d222e1f24e33029b9abdb5cfd1e6dab2a6c6024 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Fix the build issue for MacLaszlo Papp2012-09-101-1/+1
| | | | | | | Task-number: QTPLAYGROUND-4 Change-Id: I31d96779aed62b6bcc803878c0e3c74ac28aa83b Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Fix build in MacOSXDenis Shienkov2012-09-101-1/+1
| | | | | | Change-Id: I0a68494fa7d4ad50dc8d9307f3c7f55908c97a50 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Eliminate the useless "!= FALSE" and "== FALSE" explicite comparisonsLaszlo Papp2012-09-082-16/+16
| | | | | Change-Id: Iea1acbe12d4a839dc0220d4741c5ee66248fe213 Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Rejection of the reset() and replacing it an extended clear() methodDenis Shienkov2012-09-088-19/+32
| | | | | | | | | | | | | | | | | | | | | | | The reset() method did not meet the description of the method of QIODevice, he was incorrect implementation and functionality. Previously this method do reset of all buffers, although he had to do it (see QIODevice doc): "Seeks to the start of input for random-access devices. Returns true on success; otherwise returns false (for example, if the device is not open)." Therefore decided delete it. To replace the previous functionality and extend it, have been introduced new method: "bool clear (Direction dir)". Now the method have an input Direcrion parameter by which can clear the desired buffers separately for different directions. API of the operating system provides the possibility to clear the queue separately in different directions, then it needs to be implemented now. This may be necessary in the case of separate management of I/O data stream for Tx / Rx. For example, in some protocols, it is necessary, also it increases flexibility and versatility. Change-Id: I0f63793189fcbbd80dfc8d9bc649c80c4eecc8da Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* For Win32 API, Qt-data types replaced to Windows-data typesDenis Shienkov2012-09-074-62/+62
| | | | | | | | | | | This patch was made by analogy of previous similar commit I2c67d9b1bab36fc63937ef386aef56d2a4472a04 It is a good style for avoiding the type conversions. Change-Id: I03f8329e740ea25f9b223c251a507924aed2368a Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* For *nix append CREAD only for ReadOnly or ReadWrite modeDenis Shienkov2012-09-071-1/+4
| | | | | | Change-Id: I0d6f74151977cb8a7dc5cfaf8fab5889293d54a3 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Use an int maxSize api instead of a boolean byChunkLaszlo Papp2012-09-075-27/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Simplifies the codebase since there is no any need for separate handlings internally. 2) More flexible approach with regards to the size. 3) More consistent with the rest of Qt where maxSize is thoroughly used. 4) "byChunk" is a really weird term, but cannot be turn into anything marginly better unfortunately. 5) The previously introduced way also has the term limitation that byChunk may eventually mean that less than chunk size is written. The maxSize term is also referring to that better. 6) This solution theoritically produces a faster code for time critical cases where the chunk usage is preferred due to the avoiding of the extra condition checks. It also procudes a bit slower performance for non time critical codes like flush. In the end, this is what we need. 7) The compiler would not optimize this out either since it is beyond its scope. 8) No need for a brief documentation or comment for the method this way since the parameter name makes sure it is clear what is taking place. With the other approach, a short documentation or comment would have been a must have. Change-Id: I60a9d3671f5c650f26c3add18d9bfc865a190c01 Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Refactored the flush() methodDenis Shienkov2012-09-065-11/+29
| | | | | | | | | | Now all the data from the internal transmit ring buffer force writes to the buffer of driver. Also waiting of completing the transfer of all data from the buffer of driver. Change-Id: I1e7febf914e83bd9a6ac33ce058c6ee7ae363170 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Eliminate the unnecessary variable and condition checkLaszlo Papp2012-09-061-4/+2
| | | | | | Change-Id: Icd0ce3363bc60eaa3bb18efb71229c6ff38ba551 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Do not support older version than Qt 4.7Laszlo Papp2012-09-053-36/+0
| | | | | | | | | | Qt 4.7 was released about two years ago. Elapsed timer should be widely available now. I cannot mention any use case where the ifdef is worth it. Thereby, it is better to optimize the maintenance. Change-Id: I792e5934d6d38312b58bce7489d7909eeaef2f82 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* SerialPortInfo, replace unnecessary includesDenis Shienkov2012-09-051-1/+1
| | | | | | Change-Id: I128c406693e02dfbab4cd42ab3cb6afacb0104c4 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* The new concept of the internal structureDenis Shienkov2012-09-0523-5968/+4103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complete replacement and optimization the internal logic, because previous internal structure was complicated, not flexible and sometimes causes more load of the CPU. Changes: * Replacement Engine extra layer of abstraction to a private implementation. Now, all the platform-dependent API (e.g. I/O, etc.) implemented in private classes, and for I/O notification uses separate helper classes. * Rejection of multiple inheritance of Notifiers classes. Now for the notifications uses separate classes, which simplifies the understanding of the code and to separate these entities in terms of functionality. See, by analogy to the implementation notifier in QAbstractSocket. * The implementation of a fully asynchronous I/O for Win32. * Only buffered mode supported To try out the new concept can use a simple test-tool: https://bugreports.qt-project.org/secure/attachment/28899/CpuUsageTester.zip Change-Id: I372492ace3926e67671e7e0935312436d6ae8ac7 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Linux + udev: Fixed misplaced header fileJorge Aparicio2012-08-281-1/+1
| | | | | | | | | | | Commit 5c88b44995502677144a1fa622c4ddc3863011ff resulted in a header file being misplaced inside a conditional macro block, when it's needed by a function that's is defined outside of all the conditional macro blocks. Change-Id: I3ac778e92e223b624ef12e12583ca9288b29d68e Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* SerialPortInfo optimization of the internal structDenis Shienkov2012-08-195-106/+18
| | | | | | | | | Some platform-dependent parts of the code moved to the separate modules and common parts of code removed from the separate modules. Change-Id: I5a0a83cc2cfc3525b67abdedbab14ac42f2eeaf9 Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Moving WinCe implementation to the separate module.Denis Shienkov2012-08-067-366/+1515
| | | | | | | | It need for prepare to the discard of Engine and on future change the internal structure. Change-Id: I246243eef9401bbe568e2469de2c9d58e1ccd9d9 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Move all dependent variables and methods to SerialPort namespaceDenis Shienkov2012-08-065-13/+7
| | | | | | | | All static functions, variables, and so forth, which belong to the addon moved into the namespace. Change-Id: I47268449f425e359f490776d28df4da2bec50fd5 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Unify the "#if (!)defined" handling into "#if(n)def"Laszlo Papp2012-08-0612-132/+132
| | | | | Change-Id: I580a62dd52b4151f511042f7a382d9a4c1532fc9 Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Use sizeof(myVariableName) instead of sizeof(myVariableType)Laszlo Papp2012-08-063-29/+23
| | | | | | Change-Id: Ie9d43207cf8e21ffcff082a23a1dbc1ac8e36aa3 Reviewed-by: Aleksei Timofeyev <aleksei.timofeyev@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Remove non Unix releated code from Unix engine.Aleksei Timofeyev2012-08-021-6/+0
| | | | | | | Remove Symbian and VxWorks related code from Unix engine. Change-Id: Ic5b753ef8f2f5bd41e5f465faf8425190d820f50 Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Fix incorrect use of cfgetispeed.Aleksei Timofeyev2012-08-011-1/+1
| | | | | | | | | Wrong use of cfgetispeed for setting output rate. Change-Id: I205e49ec09f3278ee2ac15e97a6f38d02ece2a0d Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Assign the structures directly to each other instead of memcpysLaszlo Papp2012-08-012-7/+5
| | | | | | Change-Id: I549c063d53cd5d08425fac480be60085922cd9fb Reviewed-by: Aleksei Timofeyev <aleksei.timofeyev@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Remove quotes since 'echo' on Windows keeps them and result is wrongMarius Storm-Olsen2012-07-281-2/+2
| | | | | | | | Linux will still handle it correctly. Change-Id: Icbc9baa77a737237d09f03cbd3933183b0ae5b88 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Make sure library follows the configured libinfixMarius Storm-Olsen2012-07-281-2/+2
| | | | | | Change-Id: Iaa0e87df379210f210d07265f393b29c270e44e6 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Remove unnecessary disabling of socket notifiers.Aleksei Timofeyev2012-07-201-7/+1
| | | | | | | | | | Disabling of all socket notifiers in Unix serial engine destructor is unnecessary. They will be deleted automatically by their parent. Change-Id: I53f06f0e3f29350aabd36646c0d15bfb8f2cdeb7 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Delete a previously created QSocketNotifiers.Aleksei Timofeyev2012-07-191-0/+16
| | | | | | | | Delete notifiers on close in Unix engine to avoid a descriptor mismatch for next open. Change-Id: I21ba89933161004d721e172ad9f7c01fa4b85fa2 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Build the UI examples only, if the QtWidgets module is presentLaszlo Papp2012-07-151-1/+6
| | | | | | | | | | | | | | | | This only works nicely with Qt5 because there is no simple way of achieving the "!isEmpty(QT.widgets.name)" feature with the previous major versions. In general, the recommendation is that to depend on modules in the examples that are also the dependency of the library itself. However, that can be an exception made with optional dependencies that the Qt Project accepts. Tested on Linux with Qt5, and this works fine. There were no regressions to the previous operations with Qt4 either. Change-Id: I0d86557bb2a49300bb3bfd0adb94b61b1e7d4cc3 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Rename the include-helper to install-helper since it exceeds its original scopeLaszlo Papp2012-07-032-1/+1
| | | | | | | | | | | | | | This file was originally planned for helping with the include file generations, but as the time went ahead, it got actually a bit more feature rich, and became the centre of the helping with all the installation related features, like mkspecs feature file, target library, dll binary and also of course the header file installations. Therefore, the current name is misleading while looking for information (i.e. checking the target library installation related issues, or the prf file) Change-Id: Ie714b858fbe47568c9a1e885e2cfb781f64f9cdf Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* On Windows added missing install dll targetDenis Shienkov2012-07-031-0/+5
| | | | | | | | For Qt4 added a missed target installation library to the Qt /bin directory. Change-Id: Idc3fe702ff2b2af229f37df62f24afa700c881e7 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Fixed the installation of the library on WindowsDenis Shienkov2012-07-032-13/+9
| | | | | | | | Now at run "make install" (or "nmake install") is the correct copy all necessary files of library to destination installation directory. Change-Id: I8493dbbca27409dc886e3fca73c49623c5e58c35 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Clean up the private and public comments that are not matching the Qt styleLaszlo Papp2012-06-309-34/+0
| | | | | | Change-Id: Ibfdb60e63164ad153f3e75999baa2ea64214d83b Reviewed-by: Andre Hartmann <aha_1980@gmx.de> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Moved common static methods to SerialPortPrivate.Denis Shienkov2012-06-2913-445/+446
| | | | | | | | | | | | | | Common methods for internal use, such as: rateFromSetting(), settingFromRate(), standardRates(), toSystemLocation(), fromSystemLocation() are now is static and are part of the class SerialPortPrivate. This allows the use of these static methods within the class SerialPort, and within a class SerialPortInfo. Change-Id: Id69c219de11de8e861b775ce8960abf8abc72e36 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Small fix a coding styleDenis Shienkov2012-06-241-5/+5
| | | | | | | | Variable a do_append replaced to canAppendToList as closer to of the agreements with the Qt-code style. Change-Id: I2e0de38bba2d06df7fcd97b799778ac4f1c29438 Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Linux: Added support for RFCOMM devices using udevJorge Aparicio2012-06-241-5/+21
| | | | | | | | | | | | | | | | | | | | | | RFCOMM devices were not being detected previously, as they do NOT have a parent device. This issue has been fixed. This changeset has been tested using the cenumerator example provided by the library: jorge@Jorge-Laptop:~/qtserialport$ ./examples/cenumerator/cenumerator Total number of ports available: 1 Port: rfcomm0 Location: /dev/rfcomm0 Description: Manufacturer: Vendor Idenifier: Product Idenifier: Busy: No jorge@Jorge-Laptop:~/qtserialport$ Change-Id: I7b145c6450be42380df5112694b54068bb6c5ad0 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Optimization autodetect serial ports using libudevDenis Shienkov2012-06-191-21/+27
| | | | | | | | | | | | | This patch is the continuation of the previous patch: * Some text strings are QString replaced by QLatin1String. * String comparisons are now carried out by using the == operator, like faster. * By default, all devices that have the names of the subsystems is not equal to 'usb', 'pnp', 'platform' are added to the list (including the Gadget serial devices). Change-Id: If4f9e0b45b8a23b76dd427c15865aac836ff4e8a Reviewed-by: Denis Shienkov <scapig@yandex.ru>
* Add support for the gadget serial driver while using udevLaszlo Papp2012-06-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous patch fixes the case when there is no available udev for managing the list, but this also needs to be fixed. The problem is that, the devices are disregarded without having the "usb" or "pnp" subsystem containment. As for the /dev/ttyGS0 gadget serial driver, there is no subsystem, so that is empty, but we still need to add those into the list as a valid serial port. The only problematic case is when the subsystem is the "platform". There are examples on my pandaboard for such invalid nodes that should not be added, like the /dev/tty0* which are ARM OMAP related. After applying this patch, the "cenumerator" example returns the gadget serial device properly on my pandaboard with 12.04 stock ARM Ubuntu. root@localhost:~/qtserialport# ./examples/cenumerator/cenumerator Total number of ports available: 1 Port: ttyGS0 Location: /dev/ttyGS0 Description: Manufacturer: Vendor Idenifier: Product Idenifier: Busy: No root@localhost:~/qtserialport# Please see the following page for further information about the gadget serial driver: http://kernel.org/doc/Documentation/usb/gadget_serial.txt Change-Id: Ia7b17e1e0c294afec17658a1eb0971550dccc7b5 Reviewed-by: Denis Shienkov <scapig@yandex.ru>