summaryrefslogtreecommitdiffstats
path: root/src/serialport/qt4support
Commit message (Collapse)AuthorAgeFilesLines
* Drop the Qt4 supportDenis Shienkov2014-10-2310-1435/+0
| | | | | | | | Now QtSerialPort can be built for Qt5 only. QtSerialPort for Qt4 is developed in a separate branch. Change-Id: Iaaa95fb7cb0aedbfc1b17ed11717fff8f9c126a0 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Update license headers and add new license filesAntti Kokko2014-09-098-148/+84
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I08685205169cdd4b49a651ed98f36ba1e6c1bb29 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Update QRingBuffer by recent version from qtbaseAlex Trotsenko2014-07-281-225/+93
| | | | | | | Fix some issues. Optimized for size and speed. Change-Id: Ie7b55e3f01fb088999d3a5b10d0d941934fda162 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Refactor of the QSerialPortInfo for OS XDenis Shienkov2014-07-091-0/+148
| | | | | | | | | | | | | | | | | | | The current implementation of the qserialportinfo_mac.cpp module is a little confused and complicated. It is reasonable to re-write it using some ready wrappers of CFTypeRef, CFStringRef and others objects from the private qcore_mac_p.h file. Thus, it will allow to bypass of manual releasing of the allocated resources (using the RAII idiom where it is possible), and also to simplify a code. Tested on OS X 10.8.4 with the on-board, USB PL2303, USB FTDI, USB Android serial ports and with the USB ZTE Modem using Qt4. Change-Id: Ibbac03a17fdd41bbaf530f863e7c690a15708bd2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Don't remove -framework on Mac.Marcel Krems2014-04-031-2/+2
| | | | | | | | | | | "LIBS -= -framework QtSerialPort" removes all occurrences of -framework which breaks the build if you use a framework together with QtSerialPort. To avoid this we skip the call to qtAddLibrary under Mac. Task-number: QTBUG-37989 Change-Id: I53b71ad433e93c8c59d17c526ef2424db47bca15 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Use the qt_safe_* methods for open/read/write/closeLaszlo Papp2014-02-161-0/+124
| | | | | | | | | | | | | | This makes the operation thread-safe. It also helps with preventing the leaks for child processes. Also, there is now some protection against EINTR when the system call has to be restarted. Thanks go to Thiago Macieira for providing the original patches. Task-number: QTBUG-36824 Change-Id: I90cac87c5e1c55a57e5ba6c20313446c43c6d242 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Fix the build on Linux with Qt4Denis Shienkov2013-11-071-1/+1
| | | | | Change-Id: I7bb118399182d316403ce9a2aa4b082b03158c1e Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Use the QLockFile source on Unix only to avoid errors on other platformsLaszlo Papp2013-11-061-2/+5
| | | | | | Change-Id: I406ec1dc0a7e131db5ea93060e9a2adc47c50489 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-065-1/+752
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Revert the incompatible qwineventnotifier.h for Qt4Denis Shienkov2013-10-111-2/+7
| | | | | | | | | | | | | | | | The change * 50ab4d4a8ff5f882b9699cbde26ad9d8824a4824 sync'd up the header file in question with the updates, but those changes are incompatible with Qt4. This unfortunately means, a mix has to be applied from both version. Tested on Windows with Qt4 (MinGW). Change-Id: I0468c03ccfb276096cfc3adf80bfc0b3488c81f2 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Eliminate the ifdef in the code for imported headers (qt4support)Laszlo Papp2013-10-093-21/+10
| | | | | | | | | | | | | | | | | | | As I previously wrote on Gerrit, this idea of resembling the include hiearchy inside qt4support has two advantages: 1) The includes are well-separated for Qt 4 that are imported. 2) The code is less complex due to the non-existence of ifdefs for major Qt variants. The only disadvantage is that the build system got one additional line, but the benefits outweigh that. This has been (only build!) tested on Linux (Arch) with Qt 4 and then 5. Change-Id: Ic33632cd0e569693a65af094479dac0a02b1a7f7 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Qt 4: Refactor the shell handling for header generationLaszlo Papp2013-08-231-7/+3
| | | | | | | | | | | | | | | It does not make much sense to use branches for only a minor difference, hence there is now a precheck for the host os and the quote variable is set accordingly. This is a slightly modified version of what QtCreator's qtcreator.pro is using. Basically, single quote is used here for the quote variable rather than double quote as double quote is causing issues at least on my machine. Task-number: QTBUG-33125 Change-Id: I9eb0a0a62e1404a095cfc3b1bd68c519552d23b8 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Use QT_INSTALL_HEADERS instead of QT_INSTALL_PREFIX/includeLaszlo Papp2013-07-191-1/+1
| | | | | | | | | It is more accurate this way as there might be scenarios, like Red Hat, where the headers are not installed into $$QT_INSTALL_PREFIX/include. Task-number: QTBUG-31966 Change-Id: I4be31a4b218aed008fecba81e8d2b91616cea370 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Use debug_and_release_target for mixed release and build selectionLaszlo Papp2013-06-251-1/+1
| | | | | | | | | It is more appropriate as it is a more abstract use case than just tightening it to Windows. Change-Id: I60d0ea472299b3048ad6762512d632d010366f95 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Prefer the library built in the project tree for the examples and testsLaszlo Papp2013-03-111-5/+6
| | | | | | | | | | | | | | | | | | | | This is necessary when the user has a previous QtSerialPort version installed because the examples and tests will pick up the old installed version. That can cause breakages for the "one shot" build in case of API breaks or behavior changes. For consistency, and more importantly for proper explicit usage without raw INCLUDEPATH usage, QMAKE_INCDIR is introduced in place. qtAddLibrary has to be moved to the beginning not to prepend the QtSerialPort include later, and hence to avoid the issue for the example and test builds. This change also removes a left-over line for Mac as it has just been tested that the line is unnecessary. Change-Id: If391b4398a323e0a3eb285bd79d98ec1dd410381 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Move the define to the Qt4 support folderLaszlo Papp2013-02-171-0/+1
| | | | | | | | | | | | | | | | This is not necessary on Linux when building with gcc. However, I will not put this into the win32 { ... } branch that can be found in that install-helper.pri already because I have not tested this for cross-compilation with mingw on Linux to Windows. I am not sure about Mac either. So, even though this is not necessary on Linux, it is safer to but into the "common" not to cause breakages for now. This is for sure not necessary for Qt5 as none of the other modules use such defines that I have checked, at least. Change-Id: Ic4d3f0a7d5687e1a91271f09574fe7b99738cb59 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Remove the left-over QSerialPortGlobal forward header generation for Qt4Laszlo Papp2013-02-081-1/+0
| | | | | | Change-Id: Ic72caaaf5843f66d3b67e4dc0d5b77f5997601f7 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Fix the build for Qt4 after the coding convetion changesLaszlo Papp2013-02-081-0/+2
| | | | | | | | | This is a sensible step either way as the library build should not use its prf file while building itself as that is a target for the examples, tests inside the project, and also for the third-party applications. Change-Id: I4cdd431cc9eeda660ec9f92a8dfe76d910de39cf Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Fix the license issues to pass the QtQA license testsLaszlo Papp2013-02-062-50/+50
| | | | | | | | | | | The issues were revealed by qtqa/tests/prebuild/license/tst_licenses.pl while trying to put the QtSerialPort under CI. X - Y is an unfortunate workaround, but seems to be necessary for now due to the following change: https://codereview.qt-project.org/#change,14529 Change-Id: I265f1929961705eda9db54386e721f20495c329c Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Unbreak the terminal example compilationLaszlo Papp2013-02-061-2/+0
| | | | | | | | | | | | | | | | This is a workaround, and not a real fix as the whole namespace situation is a mess for now, and has to be discussed with others. The real fix has to wait, but the build has to be working right now off-hand. Also, there is not much point in exposing this global header file for Qt4 either as the usage of the two public classes should be enough along with the deterministic namespace name that will be agreed upon later (i.e. the namespace define will be removed most likely). Tested with Qt5, and the terminal example builds just fine on ArchLinux. Change-Id: I9609afb43997ed20bf9770b517a93121bff84d82 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Make the cross Qt4/5 versions experience better with forward headersLaszlo Papp2013-01-301-0/+18
| | | | | | | | | | This is not a nice way, but quick of getting this feature done. For future reference, we should most likely do something as QtCreator does for instance with "QMAKE_SUBSTITUTES". Change-Id: I3df23ac019552f9586aede336296079109066da1 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Change the QtCore reference in the copyright headers to QtSerialPortLaszlo Papp2013-01-272-2/+2
| | | | | Change-Id: Ic19f6843d32260404f72038cf77aa6f686e7a3ff Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Call the module QtSerialPort instead of QtAddOnSerialPortLaszlo Papp2013-01-262-19/+16
| | | | | | | | 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>
* Fix install-helper.priAleksei Timofeyev2012-11-281-1/+1
| | | | | | | | Any path name with spaces must be enclosed in quotation marks. Change-Id: I5100c83d7fd96ddf91313395e97be0e530465771 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Updating a project tree for compilation fixingDenis Shienkov2012-11-054-0/+599
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>