diff options
author | Laszlo Papp <lpapp@kde.org> | 2012-04-03 14:04:15 +0300 |
---|---|---|
committer | Denis Shienkov <scapig@yandex.ru> | 2012-04-03 13:56:10 +0200 |
commit | 00bb45fe9b3e9c68d9a2f2d5a469de4c2e1c6040 (patch) | |
tree | 0395e303d4ac10bbf3ce34f5ff7225ede819bdf2 /src/src.pro | |
parent | cd8c1a55235e39769417b97340458e1e0d75bf00 (diff) | |
download | qtserialport-00bb45fe9b3e9c68d9a2f2d5a469de4c2e1c6040.tar.gz |
Import the internal (private) QRingBuffer class from Qt5 to support Qt4
Making QRingBuffer public in Qt5 is not supported since it is not a real ring
buffer. It is used only for the QIODevice and QAbstractSocket internal buffers.
It is optimised for those. They will keep changing it to match those needs. That
is though not a real problem for our use case because the serial port module was
designed with QIODevice and QAbstractSocket resemblance in mind.
As for Qt4, even if it was possible, we cannot change this too flexibly, at
least not without a Qt4.9 and huge effort of convincing many people about it. I
have personally never heard of any plans about Qt4.9.
As for the time being, we could import this qringbuffer_p.h header file for
working out-of-the-box with Qt4. The file should be residing in the qt4support
folder. One neater solution would have been to use "core-private", but
unfortunately that is not gonna work with Qt4, as in:
"Project MESSAGE: Warning: unknown QT: core-private".
In any case, importing qringbuffer_p.h into the project seems to be a way as it
is used to be with QSerialDevice. This patch is yet another step against
superseding QSerialDevice with QtSerialPort even for Qt4 without too intrusive
changes in my opinion.
Change-Id: I95e1763f263ee4c94ba2634b097b94406564ac5b
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
Diffstat (limited to 'src/src.pro')
-rw-r--r-- | src/src.pro | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/src.pro b/src/src.pro index 8e33097..352da01 100644 --- a/src/src.pro +++ b/src/src.pro @@ -15,6 +15,7 @@ CONFIG += module create_prl MODULE_PRI = ../modules/qt_serialport.pri include($$PWD/src-lib.pri) +include(qt4support/qt4support.pri) mac:QMAKE_FRAMEWORK_BUNDLE_NAME = $$QT.serialport.name |