Hello community,
here is the log from the commit of package libqt5-qtserialport for
openSUSE:Factory checked in at 2016-06-25 01:54:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libqt5-qtserialport (Old)
and /work/SRC/openSUSE:Factory/.libqt5-qtserialport.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libqt5-qtserialport"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libqt5-qtserialport/libqt5-qtserialport.changes
2016-05-17 17:05:36.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.libqt5-qtserialport.new/libqt5-qtserialport.changes
2016-06-25 01:54:52.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Jun 8 14:15:20 UTC 2016 - [email protected]
+
+- Update to 5.6.1
+ * For more details please see:
+ http://blog.qt.io/blog/2016/06/08/qt-5-6-1-released/
+
+-------------------------------------------------------------------
Old:
----
qtserialport-opensource-src-5.6.0.tar.xz
New:
----
qtserialport-opensource-src-5.6.1.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libqt5-qtserialport.spec ++++++
--- /var/tmp/diff_new_pack.oKxYAy/_old 2016-06-25 01:54:53.000000000 +0200
+++ /var/tmp/diff_new_pack.oKxYAy/_new 2016-06-25 01:54:53.000000000 +0200
@@ -21,15 +21,15 @@
%define libname libQt5SerialPort5
Name: libqt5-qtserialport
-Version: 5.6.0
+Version: 5.6.1
Release: 0
Summary: Qt 5 Serial Port Addon
License: SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0
Group: Development/Libraries/X11
Url: http://qt.digia.com
%define base_name libqt5
-%define real_version 5.6.0
-%define so_version 5.6.0
+%define real_version 5.6.1
+%define so_version 5.6.1
%define tar_version qtserialport-opensource-src-%{real_version}
Source: %{tar_version}.tar.xz
Source1: baselibs.conf
@@ -89,6 +89,14 @@
API guarantees. The packages that build against these have to require
the exact Qt version.
+%package examples
+Summary: Qt5 Serial Port examples
+Group: Development/Libraries/X11
+Recommends: %{name}-devel
+
+%description examples
+Examples for libqt5-qtserialport module.
+
%post -n %libname -p /sbin/ldconfig
%postun -n %libname -p /sbin/ldconfig
@@ -128,4 +136,9 @@
%{_libqt5_libdir}/pkgconfig/Qt5SerialPort.pc
%{_libqt5_archdatadir}/mkspecs/modules/qt_lib_serialport*.pri
+%files examples
+%defattr(-,root,root,755)
+%doc LGPL_EXCEPTION.txt LICENSE.*
+%{_libqt5_examplesdir}/
+
%changelog
++++++ qtserialport-opensource-src-5.6.0.tar.xz ->
qtserialport-opensource-src-5.6.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtserialport-opensource-src-5.6.0/.qmake.conf
new/qtserialport-opensource-src-5.6.1/.qmake.conf
--- old/qtserialport-opensource-src-5.6.0/.qmake.conf 2016-02-18
08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/.qmake.conf 2016-05-20
08:00:50.000000000 +0200
@@ -1,3 +1,3 @@
load(qt_build_config)
-MODULE_VERSION = 5.6.0
+MODULE_VERSION = 5.6.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtserialport-opensource-src-5.6.0/.tag
new/qtserialport-opensource-src-5.6.1/.tag
--- old/qtserialport-opensource-src-5.6.0/.tag 2016-02-18 08:26:48.000000000
+0100
+++ new/qtserialport-opensource-src-5.6.1/.tag 2016-05-20 08:00:50.000000000
+0200
@@ -1 +1 @@
-03d492e49e74eefa1c83e37e833d862f4b9f1e45
+c1355ae41ee46437e9d6583dc4ea452a82b6b53b
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtserialport-opensource-src-5.6.0/dist/changes-5.6.1
new/qtserialport-opensource-src-5.6.1/dist/changes-5.6.1
--- old/qtserialport-opensource-src-5.6.0/dist/changes-5.6.1 1970-01-01
01:00:00.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/dist/changes-5.6.1 2016-05-20
08:00:50.000000000 +0200
@@ -0,0 +1,31 @@
+Qt 5.6.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.6.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+ http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.6 series is binary compatible with the 5.5.x series.
+Applications compiled for 5.5 will continue to run with 5.6.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+ - QSerialPortInfo:
+ * Added enumeration of dial-in serial ports on FreeBSD.
+ * [QTBUG-50895] Added enumeration of dial-in serial ports on OS X.
+ * Added receiving of USB dongle's serial number on Windows.
+
+ - QSerialPort:
+ * Prohibited changing of RTS in HardwareFlowControl mode.
+ * [QTBUG-48677] Fixed reading of data remainder with the CDC USB device on
Windows.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/blockingmaster/blockingmaster.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/blockingmaster/blockingmaster.pro
---
old/qtserialport-opensource-src-5.6.0/examples/serialport/blockingmaster/blockingmaster.pro
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/examples/serialport/blockingmaster/blockingmaster.pro
2016-05-20 08:00:50.000000000 +0200
@@ -11,3 +11,6 @@
main.cpp \
dialog.cpp \
masterthread.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/blockingmaster
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/blockingslave/blockingslave.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/blockingslave/blockingslave.pro
---
old/qtserialport-opensource-src-5.6.0/examples/serialport/blockingslave/blockingslave.pro
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/examples/serialport/blockingslave/blockingslave.pro
2016-05-20 08:00:50.000000000 +0200
@@ -11,3 +11,6 @@
main.cpp \
dialog.cpp \
slavethread.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/blockingslave
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/cenumerator/cenumerator.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/cenumerator/cenumerator.pro
---
old/qtserialport-opensource-src-5.6.0/examples/serialport/cenumerator/cenumerator.pro
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/examples/serialport/cenumerator/cenumerator.pro
2016-05-20 08:00:50.000000000 +0200
@@ -9,3 +9,6 @@
SOURCES += \
main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/cenumerator
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/creaderasync/creaderasync.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/creaderasync/creaderasync.pro
---
old/qtserialport-opensource-src-5.6.0/examples/serialport/creaderasync/creaderasync.pro
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/examples/serialport/creaderasync/creaderasync.pro
2016-05-20 08:00:50.000000000 +0200
@@ -13,3 +13,6 @@
SOURCES += \
main.cpp \
serialportreader.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/creaderasync
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/creadersync/creadersync.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/creadersync/creadersync.pro
---
old/qtserialport-opensource-src-5.6.0/examples/serialport/creadersync/creadersync.pro
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/examples/serialport/creadersync/creadersync.pro
2016-05-20 08:00:50.000000000 +0200
@@ -9,3 +9,6 @@
SOURCES += \
main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/creadersync
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/cwriterasync/cwriterasync.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/cwriterasync/cwriterasync.pro
---
old/qtserialport-opensource-src-5.6.0/examples/serialport/cwriterasync/cwriterasync.pro
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/examples/serialport/cwriterasync/cwriterasync.pro
2016-05-20 08:00:50.000000000 +0200
@@ -13,3 +13,6 @@
SOURCES += \
main.cpp \
serialportwriter.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/cwriterasync
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/cwritersync/cwritersync.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/cwritersync/cwritersync.pro
---
old/qtserialport-opensource-src-5.6.0/examples/serialport/cwritersync/cwritersync.pro
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/examples/serialport/cwritersync/cwritersync.pro
2016-05-20 08:00:50.000000000 +0200
@@ -9,3 +9,6 @@
SOURCES += \
main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/cwritersync
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/enumerator/enumerator.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/enumerator/enumerator.pro
---
old/qtserialport-opensource-src-5.6.0/examples/serialport/enumerator/enumerator.pro
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/examples/serialport/enumerator/enumerator.pro
2016-05-20 08:00:50.000000000 +0200
@@ -5,3 +5,6 @@
SOURCES += \
main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/enumerator
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/master/master.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/master/master.pro
--- old/qtserialport-opensource-src-5.6.0/examples/serialport/master/master.pro
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/examples/serialport/master/master.pro
2016-05-20 08:00:50.000000000 +0200
@@ -13,3 +13,6 @@
SOURCES += \
main.cpp \
dialog.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/master
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/serialport.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/serialport.pro
--- old/qtserialport-opensource-src-5.6.0/examples/serialport/serialport.pro
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/examples/serialport/serialport.pro
2016-05-20 08:00:50.000000000 +0200
@@ -1,4 +1,3 @@
TEMPLATE = subdirs
-CONFIG += ordered
SUBDIRS = cenumerator creaderasync creadersync cwriterasync cwritersync
-!isEmpty(QT.widgets.name):SUBDIRS += enumerator terminal blockingmaster
blockingslave
+!isEmpty(QT.widgets.name):SUBDIRS += enumerator terminal blockingmaster
blockingslave master slave
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/slave/slave.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/slave/slave.pro
--- old/qtserialport-opensource-src-5.6.0/examples/serialport/slave/slave.pro
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/examples/serialport/slave/slave.pro
2016-05-20 08:00:50.000000000 +0200
@@ -13,3 +13,6 @@
SOURCES += \
main.cpp \
dialog.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/slave
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/examples/serialport/terminal/terminal.pro
new/qtserialport-opensource-src-5.6.1/examples/serialport/terminal/terminal.pro
---
old/qtserialport-opensource-src-5.6.0/examples/serialport/terminal/terminal.pro
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/examples/serialport/terminal/terminal.pro
2016-05-20 08:00:50.000000000 +0200
@@ -20,3 +20,6 @@
RESOURCES += \
terminal.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/serialport/terminal
+INSTALLS += target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.0/QtSerialPort/private/qserialport_p.h
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.0/QtSerialPort/private/qserialport_p.h
---
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.0/QtSerialPort/private/qserialport_p.h
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.0/QtSerialPort/private/qserialport_p.h
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/serialport/qserialport_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.0/QtSerialPort/private/qserialportinfo_p.h
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.0/QtSerialPort/private/qserialportinfo_p.h
---
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.0/QtSerialPort/private/qserialportinfo_p.h
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.0/QtSerialPort/private/qserialportinfo_p.h
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/serialport/qserialportinfo_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.0/QtSerialPort/private/qtudev_p.h
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.0/QtSerialPort/private/qtudev_p.h
---
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.0/QtSerialPort/private/qtudev_p.h
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.0/QtSerialPort/private/qtudev_p.h
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include "../../../../../src/serialport/qtudev_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.1/QtSerialPort/private/qserialport_p.h
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.1/QtSerialPort/private/qserialport_p.h
---
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.1/QtSerialPort/private/qserialport_p.h
1970-01-01 01:00:00.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.1/QtSerialPort/private/qserialport_p.h
2016-05-20 08:00:50.000000000 +0200
@@ -0,0 +1 @@
+#include "../../../../../src/serialport/qserialport_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.1/QtSerialPort/private/qserialportinfo_p.h
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.1/QtSerialPort/private/qserialportinfo_p.h
---
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.1/QtSerialPort/private/qserialportinfo_p.h
1970-01-01 01:00:00.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.1/QtSerialPort/private/qserialportinfo_p.h
2016-05-20 08:00:50.000000000 +0200
@@ -0,0 +1 @@
+#include "../../../../../src/serialport/qserialportinfo_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.1/QtSerialPort/private/qtudev_p.h
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.1/QtSerialPort/private/qtudev_p.h
---
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/5.6.1/QtSerialPort/private/qtudev_p.h
1970-01-01 01:00:00.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/5.6.1/QtSerialPort/private/qtudev_p.h
2016-05-20 08:00:50.000000000 +0200
@@ -0,0 +1 @@
+#include "../../../../../src/serialport/qtudev_p.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/qtserialportversion.h
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/qtserialportversion.h
---
old/qtserialport-opensource-src-5.6.0/include/QtSerialPort/qtserialportversion.h
2016-03-13 17:25:40.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/include/QtSerialPort/qtserialportversion.h
2016-06-02 09:03:52.000000000 +0200
@@ -2,8 +2,8 @@
#ifndef QT_QTSERIALPORT_VERSION_H
#define QT_QTSERIALPORT_VERSION_H
-#define QTSERIALPORT_VERSION_STR "5.6.0"
+#define QTSERIALPORT_VERSION_STR "5.6.1"
-#define QTSERIALPORT_VERSION 0x050600
+#define QTSERIALPORT_VERSION 0x050601
#endif // QT_QTSERIALPORT_VERSION_H
Files
old/qtserialport-opensource-src-5.6.0/src/serialport/doc/images/blockingmaster-example.png
and
new/qtserialport-opensource-src-5.6.1/src/serialport/doc/images/blockingmaster-example.png
differ
Files
old/qtserialport-opensource-src-5.6.0/src/serialport/doc/images/blockingslave-example.png
and
new/qtserialport-opensource-src-5.6.1/src/serialport/doc/images/blockingslave-example.png
differ
Files
old/qtserialport-opensource-src-5.6.0/src/serialport/doc/images/enumerator-example.png
and
new/qtserialport-opensource-src-5.6.1/src/serialport/doc/images/enumerator-example.png
differ
Files
old/qtserialport-opensource-src-5.6.0/src/serialport/doc/images/terminal-example.png
and
new/qtserialport-opensource-src-5.6.1/src/serialport/doc/images/terminal-example.png
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/doc/qtserialport.qdocconf
new/qtserialport-opensource-src-5.6.1/src/serialport/doc/qtserialport.qdocconf
---
old/qtserialport-opensource-src-5.6.0/src/serialport/doc/qtserialport.qdocconf
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/src/serialport/doc/qtserialport.qdocconf
2016-05-20 08:00:50.000000000 +0200
@@ -34,7 +34,7 @@
imagedirs += images
excludedirs += ../qt4support
-examplesinstallpath = qtserialport/serialport
+examplesinstallpath = serialport
depends += qtcore qtdoc qtnetwork qmake
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialport.cpp
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialport.cpp
--- old/qtserialport-opensource-src-5.6.0/src/serialport/qserialport.cpp
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/src/serialport/qserialport.cpp
2016-05-20 08:00:50.000000000 +0200
@@ -955,6 +955,11 @@
return false;
}
+ if (d->flowControl == QSerialPort::HardwareControl) {
+
d->setError(QSerialPortErrorInfo(QSerialPort::UnsupportedOperationError));
+ return false;
+ }
+
const bool requestToSend = isRequestToSend();
const bool retval = d->setRequestToSend(set);
if (retval && (requestToSend != set))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialport_p.h
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialport_p.h
--- old/qtserialport-opensource-src-5.6.0/src/serialport/qserialport_p.h
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/src/serialport/qserialport_p.h
2016-05-20 08:00:50.000000000 +0200
@@ -206,6 +206,8 @@
bool getDcb(DCB *dcb);
OVERLAPPED *waitForNotified(int msecs);
+ qint64 queuedBytesCount(QSerialPort::Direction direction) const;
+
bool completeAsyncCommunication(qint64 bytesTransferred);
bool completeAsyncRead(qint64 bytesTransferred);
bool completeAsyncWrite(qint64 bytesTransferred);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialport_unix.cpp
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialport_unix.cpp
--- old/qtserialport-opensource-src-5.6.0/src/serialport/qserialport_unix.cpp
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/src/serialport/qserialport_unix.cpp
2016-05-20 08:00:50.000000000 +0200
@@ -244,15 +244,11 @@
::ioctl(descriptor, TIOCNXCL);
#endif
- if (readNotifier) {
- delete readNotifier;
- readNotifier = Q_NULLPTR;
- }
+ delete readNotifier;
+ readNotifier = Q_NULLPTR;
- if (writeNotifier) {
- delete writeNotifier;
- writeNotifier = Q_NULLPTR;
- }
+ delete writeNotifier;
+ writeNotifier = Q_NULLPTR;
qt_safe_close(descriptor);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialport_win.cpp
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialport_win.cpp
--- old/qtserialport-opensource-src-5.6.0/src/serialport/qserialport_win.cpp
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/src/serialport/qserialport_win.cpp
2016-05-20 08:00:50.000000000 +0200
@@ -106,15 +106,11 @@
{
::CancelIo(handle);
- if (notifier) {
- delete notifier;
- notifier = Q_NULLPTR;
- }
+ delete notifier;
+ notifier = Q_NULLPTR;
- if (startAsyncWriteTimer) {
- delete startAsyncWriteTimer;
- startAsyncWriteTimer = Q_NULLPTR;
- }
+ delete startAsyncWriteTimer;
+ startAsyncWriteTimer = Q_NULLPTR;
communicationStarted = false;
readStarted = false;
@@ -437,10 +433,13 @@
readStarted = false;
bool result = true;
- if (bytesTransferred == ReadChunkSize)
+ if (bytesTransferred == ReadChunkSize
+ || queuedBytesCount(QSerialPort::Input) > 0) {
result = startAsyncRead();
- else if (readBufferMaxSize == 0 || readBufferMaxSize > buffer.size())
+ } else if (readBufferMaxSize == 0
+ || readBufferMaxSize > buffer.size()) {
result = startAsyncCommunication();
+ }
if (bytesTransferred > 0)
emitReadyRead();
@@ -598,6 +597,16 @@
return overlapped;
}
+qint64 QSerialPortPrivate::queuedBytesCount(QSerialPort::Direction direction)
const
+{
+ COMSTAT comstat;
+ if (::ClearCommError(handle, Q_NULLPTR, &comstat) == 0)
+ return -1;
+ return (direction == QSerialPort::Input)
+ ? comstat.cbInQue
+ : ((direction == QSerialPort::Output) ? comstat.cbOutQue : -1);
+}
+
inline bool QSerialPortPrivate::initialize()
{
Q_Q(QSerialPort);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo.cpp
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo.cpp
--- old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo.cpp
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo.cpp
2016-05-20 08:00:50.000000000 +0200
@@ -36,6 +36,7 @@
#include "qserialportinfo.h"
#include "qserialportinfo_p.h"
#include "qserialport.h"
+#include "qserialport_p.h"
QT_BEGIN_NAMESPACE
@@ -283,9 +284,13 @@
/*!
\fn QList<qint32> QSerialPortInfo::standardBaudRates()
- Returns a list of available standard baud rates supported by
- the current serial port.
+ Returns a list of available standard baud rates supported
+ by the target platform.
*/
+QList<qint32> QSerialPortInfo::standardBaudRates()
+{
+ return QSerialPortPrivate::standardBaudRates();
+}
/*!
\fn QList<QSerialPortInfo> QSerialPortInfo::availablePorts()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo.h
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo.h
--- old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo.h
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo.h
2016-05-20 08:00:50.000000000 +0200
@@ -86,9 +86,6 @@
QSerialPortInfo(const QSerialPortInfoPrivate &dd);
friend QList<QSerialPortInfo> availablePortsByUdev(bool &ok);
friend QList<QSerialPortInfo> availablePortsBySysfs(bool &ok);
-#ifdef Q_OS_FREEBSD
- friend QList<QSerialPortInfo> availablePortsBySysctl(bool &ok);
-#endif
friend QList<QSerialPortInfo> availablePortsByFiltersOfDevices(bool &ok);
QScopedPointer<QSerialPortInfoPrivate, QSerialPortInfoPrivateDeleter>
d_ptr;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo_freebsd.cpp
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo_freebsd.cpp
---
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo_freebsd.cpp
1970-01-01 01:00:00.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo_freebsd.cpp
2016-05-20 08:00:50.000000000 +0200
@@ -0,0 +1,378 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Denis Shienkov <[email protected]>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtSerialPort module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qserialportinfo.h"
+#include "qserialportinfo_p.h"
+#include "qserialport_p.h"
+
+#include <QtCore/qdatastream.h>
+#include <QtCore/qvector.h>
+#include <QtCore/qdir.h>
+
+#include <errno.h>
+#include <sys/types.h> // kill
+#include <signal.h> // kill
+
+#include <sys/sysctl.h> // sysctl, sysctlnametomib
+
+QT_BEGIN_NAMESPACE
+
+static QString deviceProperty(const QString &source, const QByteArray &pattern)
+{
+ const int firstbound = source.indexOf(QLatin1String(pattern));
+ if (firstbound == -1)
+ return QString();
+ const int lastbound = source.indexOf(QLatin1Char(' '), firstbound);
+ return source.mid(firstbound + pattern.size(), lastbound - firstbound -
pattern.size());
+}
+
+static QString deviceName(const QString &pnpinfo)
+{
+ return deviceProperty(pnpinfo, "ttyname=");
+}
+
+static QString deviceCount(const QString &pnpinfo)
+{
+ return deviceProperty(pnpinfo, "ttyports=");
+}
+
+static quint16 deviceProductIdentifier(const QString &pnpinfo, bool
&hasIdentifier)
+{
+ QString result = deviceProperty(pnpinfo, "product=");
+ return result.toInt(&hasIdentifier, 16);
+}
+
+static quint16 deviceVendorIdentifier(const QString &pnpinfo, bool
&hasIdentifier)
+{
+ QString result = deviceProperty(pnpinfo, "vendor=");
+ return result.toInt(&hasIdentifier, 16);
+}
+
+static QString deviceSerialNumber(const QString &pnpinfo)
+{
+ QString serialNumber = deviceProperty(pnpinfo, "sernum=");
+ serialNumber.remove(QLatin1Char('"'));
+ return serialNumber;
+}
+
+// A 'desc' string contains the both description and manufacturer
+// properties, which are not possible to extract from the source
+// string. Besides, this string can contains an other information,
+// which should be excluded from the result.
+static QString deviceDescriptionAndManufacturer(const QString &desc)
+{
+ const int classindex = desc.indexOf(QLatin1String(", class "));
+ if (classindex == -1)
+ return desc;
+ return desc.mid(0, classindex);
+}
+
+struct NodeInfo
+{
+ QString name;
+ QString value;
+};
+
+static QVector<int> mibFromName(const QString &name)
+{
+ size_t mibsize = 0;
+ if (::sysctlnametomib(name.toLocal8Bit().constData(), Q_NULLPTR, &mibsize)
< 0
+ || mibsize == 0) {
+ return QVector<int>();
+ }
+ QVector<int> mib(mibsize);
+ if (::sysctlnametomib(name.toLocal8Bit().constData(), &mib[0], &mibsize) <
0)
+ return QVector<int>();
+
+ return mib;
+}
+
+static QVector<int> nextOid(const QVector<int> &previousOid)
+{
+ QVector<int> mib;
+ mib.append(0); // Magic undocumented code (CTL_UNSPEC ?)
+ mib.append(2); // Magic undocumented code
+ foreach (int code, previousOid)
+ mib.append(code);
+
+ size_t requiredLength = 0;
+ if (::sysctl(&mib[0], mib.count(), Q_NULLPTR, &requiredLength, Q_NULLPTR,
0) < 0)
+ return QVector<int>();
+ const size_t oidLength = requiredLength / sizeof(int);
+ QVector<int> oid(oidLength, 0);
+ if (::sysctl(&mib[0], mib.count(), &oid[0], &requiredLength, Q_NULLPTR, 0)
< 0)
+ return QVector<int>();
+
+ if (previousOid.first() != oid.first())
+ return QVector<int>();
+
+ return oid;
+}
+
+static NodeInfo nodeForOid(const QVector<int> &oid)
+{
+ QVector<int> mib;
+ mib.append(0); // Magic undocumented code (CTL_UNSPEC ?)
+ mib.append(1); // Magic undocumented code
+ foreach (int code, oid)
+ mib.append(code);
+
+ // query node name
+ size_t requiredLength = 0;
+ if (::sysctl(&mib[0], mib.count(), Q_NULLPTR, &requiredLength, Q_NULLPTR,
0) < 0)
+ return NodeInfo();
+ QByteArray name(requiredLength, 0);
+ if (::sysctl(&mib[0], mib.count(), name.data(), &requiredLength,
Q_NULLPTR, 0) < 0)
+ return NodeInfo();
+
+ // query node value
+ requiredLength = 0;
+ if (::sysctl(&oid[0], oid.count(), Q_NULLPTR, &requiredLength, Q_NULLPTR,
0) < 0)
+ return NodeInfo();
+ QByteArray value(requiredLength, 0);
+ if (::sysctl(&oid[0], oid.count(), value.data(), &requiredLength,
Q_NULLPTR, 0) < 0)
+ return NodeInfo();
+
+ // query value format
+ mib[1] = 4; // Magic undocumented code
+ requiredLength = 0;
+ if (::sysctl(&mib[0], mib.count(), Q_NULLPTR, &requiredLength, Q_NULLPTR,
0) < 0)
+ return NodeInfo();
+ QByteArray buf(requiredLength, 0);
+ if (::sysctl(&mib[0], mib.count(), buf.data(), &requiredLength, Q_NULLPTR,
0) < 0)
+ return NodeInfo();
+
+ QDataStream in(buf);
+ in.setByteOrder(QDataStream::LittleEndian);
+ quint32 kind = 0;
+ qint8 format = 0;
+ in >> kind >> format;
+
+ NodeInfo result;
+
+ // we need only the string-type value
+ if (format == 'A') {
+ result.name = QString::fromLocal8Bit(name.constData());
+ result.value = QString::fromLocal8Bit(value.constData());
+ }
+
+ return result;
+}
+
+static QList<NodeInfo> enumerateDesiredNodes(const QVector<int> &mib)
+{
+ QList<NodeInfo> nodes;
+
+ QVector<int> oid = mib;
+
+ forever {
+ const QVector<int> nextoid = nextOid(oid);
+ if (nextoid.isEmpty())
+ break;
+
+ const NodeInfo node = nodeForOid(nextoid);
+ if (!node.name.isEmpty()) {
+ if (node.name.endsWith(QLatin1String("\%desc"))
+ || node.name.endsWith(QLatin1String("\%pnpinfo"))) {
+ nodes.append(node);
+ }
+ }
+
+ oid = nextoid;
+ }
+
+ return nodes;
+}
+
+QList<QSerialPortInfo> QSerialPortInfo::availablePorts()
+{
+ const QVector<int> mib = mibFromName(QLatin1String("dev"));
+ if (mib.isEmpty())
+ return QList<QSerialPortInfo>();
+
+ const QList<NodeInfo> nodes = enumerateDesiredNodes(mib);
+ if (nodes.isEmpty())
+ return QList<QSerialPortInfo>();
+
+ QDir deviceDir(QLatin1String("/dev"));
+ if (!(deviceDir.exists() && deviceDir.isReadable()))
+ return QList<QSerialPortInfo>();
+
+ deviceDir.setNameFilters(QStringList() << QLatin1String("cua*") <<
QLatin1String("tty*"));
+ deviceDir.setFilter(QDir::Files | QDir::System | QDir::NoSymLinks);
+
+ QList<QSerialPortInfo> cuaCandidates;
+ QList<QSerialPortInfo> ttyCandidates;
+
+ foreach (const QString &portName, deviceDir.entryList()) {
+ if (portName.endsWith(QLatin1String(".init"))
+ || portName.endsWith(QLatin1String(".lock"))) {
+ continue;
+ }
+
+ QSerialPortInfoPrivate priv;
+ priv.portName = portName;
+ priv.device =
QSerialPortInfoPrivate::portNameToSystemLocation(portName);
+
+ foreach (const NodeInfo &node, nodes) {
+ const int pnpinfoindex =
node.name.indexOf(QLatin1String("\%pnpinfo"));
+ if (pnpinfoindex == -1)
+ continue;
+
+ if (node.value.isEmpty())
+ continue;
+
+ QString ttyname = deviceName(node.value);
+ if (ttyname.isEmpty())
+ continue;
+
+ const QString ttyportscount = deviceCount(node.value);
+ if (ttyportscount.isEmpty())
+ continue;
+
+ const int count = ttyportscount.toInt();
+ if (count == 0)
+ continue;
+ if (count > 1) {
+ bool matched = false;
+ for (int i = 0; i < count; ++i) {
+ const QString ends =
QString(QLatin1String("%1.%2")).arg(ttyname).arg(i);
+ if (portName.endsWith(ends)) {
+ matched = true;
+ break;
+ }
+ }
+
+ if (!matched)
+ continue;
+ } else {
+ if (!portName.endsWith(ttyname))
+ continue;
+ }
+
+ priv.serialNumber = deviceSerialNumber(node.value);
+ priv.vendorIdentifier = deviceVendorIdentifier(node.value,
priv.hasVendorIdentifier);
+ priv.productIdentifier = deviceProductIdentifier(node.value,
priv.hasProductIdentifier);
+
+ const QString nodebase = node.name.mid(0, pnpinfoindex);
+ const QString descnode =
QString(QLatin1String("%1\%desc")).arg(nodebase);
+
+ // search for description and manufacturer properties
+ foreach (const NodeInfo &node, nodes) {
+ if (node.name != descnode)
+ continue;
+
+ if (node.value.isEmpty())
+ continue;
+
+ // We can not separate the description and the manufacturer
+ // properties from the node value, so lets just duplicate it.
+ priv.description =
deviceDescriptionAndManufacturer(node.value);
+ priv.manufacturer = priv.description;
+ break;
+ }
+
+ break;
+ }
+
+ if (portName.startsWith(QLatin1String("cua")))
+ cuaCandidates.append(priv);
+ else if (portName.startsWith(QLatin1String("tty")))
+ ttyCandidates.append(priv);
+ }
+
+ QList<QSerialPortInfo> serialPortInfoList;
+
+ foreach (const QSerialPortInfo &cuaCandidate, cuaCandidates) {
+ const QString cuaPortName = cuaCandidate.portName();
+ const QString cuaToken = deviceProperty(cuaPortName, "cua");
+ foreach (const QSerialPortInfo &ttyCandidate, ttyCandidates) {
+ const QString ttyPortName = ttyCandidate.portName();
+ const QString ttyToken = deviceProperty(ttyPortName, "tty");
+ if (cuaToken != ttyToken)
+ continue;
+
+ serialPortInfoList.append(cuaCandidate);
+ serialPortInfoList.append(ttyCandidate);
+ }
+ }
+
+ return serialPortInfoList;
+}
+
+bool QSerialPortInfo::isBusy() const
+{
+ QString lockFilePath = serialPortLockFilePath(portName());
+ if (lockFilePath.isEmpty())
+ return false;
+
+ QFile reader(lockFilePath);
+ if (!reader.open(QIODevice::ReadOnly))
+ return false;
+
+ QByteArray pidLine = reader.readLine();
+ pidLine.chop(1);
+ if (pidLine.isEmpty())
+ return false;
+
+ qint64 pid = pidLine.toLongLong();
+
+ if (pid && (::kill(pid, 0) == -1) && (errno == ESRCH))
+ return false; // PID doesn't exist anymore
+
+ return true;
+}
+
+#if QT_DEPRECATED_SINCE(5, 2)
+bool QSerialPortInfo::isValid() const
+{
+ QFile f(systemLocation());
+ return f.exists();
+}
+#endif // QT_DEPRECATED_SINCE(5, 2)
+
+QString QSerialPortInfoPrivate::portNameToSystemLocation(const QString &source)
+{
+ return (source.startsWith(QLatin1Char('/'))
+ || source.startsWith(QLatin1String("./"))
+ || source.startsWith(QLatin1String("../")))
+ ? source : (QLatin1String("/dev/") + source);
+}
+
+QString QSerialPortInfoPrivate::portNameFromSystemLocation(const QString
&source)
+{
+ return source.startsWith(QLatin1String("/dev/"))
+ ? source.mid(5) : source;
+}
+
+QT_END_NAMESPACE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo_osx.cpp
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo_osx.cpp
---
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo_osx.cpp
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo_osx.cpp
2016-05-20 08:00:50.000000000 +0200
@@ -83,10 +83,10 @@
return value;
}
-static bool isCompleteInfo(const QSerialPortInfoPrivate &priv)
+static bool isCompleteInfo(const QSerialPortInfoPrivate &priv, const QString
&calloutDevice, const QString &dialinDevice)
{
- return !priv.portName.isEmpty()
- && !priv.device.isEmpty()
+ return !calloutDevice.isEmpty()
+ && !dialinDevice.isEmpty()
&& !priv.manufacturer.isEmpty()
&& !priv.description.isEmpty()
&& !priv.serialNumber.isEmpty()
@@ -94,11 +94,16 @@
&& priv.hasVendorIdentifier;
}
-static QString deviceSystemLocation(io_registry_entry_t ioRegistryEntry)
+static QString calloutDeviceSystemLocation(io_registry_entry_t ioRegistryEntry)
{
return searchStringProperty(ioRegistryEntry,
QCFString(kIOCalloutDeviceKey));
}
+static QString dialinDeviceSystemLocation(io_registry_entry_t ioRegistryEntry)
+{
+ return searchStringProperty(ioRegistryEntry,
QCFString(kIODialinDeviceKey));
+}
+
static QString deviceDescription(io_registry_entry_t ioRegistryEntry)
{
QString result = searchStringProperty(ioRegistryEntry,
QCFString(kIOPropertyProductNameKey));
@@ -162,12 +167,15 @@
QSerialPortInfoPrivate priv;
+ QString calloutDevice;
+ QString dialinDevice;
+
forever {
- if (priv.device.isEmpty()) {
- priv.device = deviceSystemLocation(serialPortService);
- if (!priv.device.isEmpty())
- priv.portName =
QSerialPortInfoPrivate::portNameFromSystemLocation(priv.device);
- }
+ if (calloutDevice.isEmpty())
+ calloutDevice = calloutDeviceSystemLocation(serialPortService);
+
+ if (dialinDevice.isEmpty())
+ dialinDevice = dialinDeviceSystemLocation(serialPortService);
if (priv.description.isEmpty())
priv.description = deviceDescription(serialPortService);
@@ -190,7 +198,7 @@
priv.hasProductIdentifier);
}
- if (isCompleteInfo(priv)) {
+ if (isCompleteInfo(priv, calloutDevice, dialinDevice)) {
::IOObjectRelease(serialPortService);
break;
}
@@ -200,7 +208,15 @@
break;
}
- serialPortInfoList.append(priv);
+ QSerialPortInfoPrivate calloutCandidate = priv;
+ calloutCandidate.device = calloutDevice;
+ calloutCandidate.portName =
QSerialPortInfoPrivate::portNameFromSystemLocation(calloutDevice);
+ serialPortInfoList.append(calloutCandidate);
+
+ QSerialPortInfoPrivate dialinCandidate = priv;
+ dialinCandidate.device = dialinDevice;
+ dialinCandidate.portName =
QSerialPortInfoPrivate::portNameFromSystemLocation(dialinDevice);
+ serialPortInfoList.append(dialinCandidate);
}
::IOObjectRelease(serialPortIterator);
@@ -208,11 +224,6 @@
return serialPortInfoList;
}
-QList<qint32> QSerialPortInfo::standardBaudRates()
-{
- return QSerialPortPrivate::standardBaudRates();
-}
-
#if QT_DEPRECATED_SINCE(5, 6)
bool QSerialPortInfo::isBusy() const
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo_unix.cpp
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo_unix.cpp
---
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo_unix.cpp
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo_unix.cpp
2016-05-20 08:00:50.000000000 +0200
@@ -42,21 +42,12 @@
#include <QtCore/qdir.h>
#include <QtCore/qscopedpointer.h>
-#ifdef Q_OS_FREEBSD
-#include <QtCore/qdatastream.h>
-#include <QtCore/qvector.h>
-#endif
-
#include <private/qcore_unix_p.h>
#include <errno.h>
#include <sys/types.h> // kill
#include <signal.h> // kill
-#ifdef Q_OS_FREEBSD
-#include <sys/sysctl.h> // sysctl, sysctlnametomib
-#endif
-
#include "qtudev_p.h"
QT_BEGIN_NAMESPACE
@@ -152,287 +143,13 @@
return false;
}
-#ifdef Q_OS_FREEBSD
-
-static QString deviceProperty(const QString &pnpinfo, const QByteArray
&pattern)
-{
- const int firstbound = pnpinfo.indexOf(QLatin1String(pattern));
- if (firstbound == -1)
- return QString();
- const int lastbound = pnpinfo.indexOf(QLatin1Char(' '), firstbound);
- return pnpinfo.mid(firstbound + pattern.size(), lastbound - firstbound -
pattern.size());
-}
-
-static QString deviceName(const QString &pnpinfo)
-{
- return deviceProperty(pnpinfo, "ttyname=");
-}
-
-static QString deviceCount(const QString &pnpinfo)
-{
- return deviceProperty(pnpinfo, "ttyports=");
-}
-
-static quint16 deviceProductIdentifier(const QString &pnpinfo, bool
&hasIdentifier)
-{
- QString result = deviceProperty(pnpinfo, "product=");
- return result.toInt(&hasIdentifier, 16);
-}
-
-static quint16 deviceVendorIdentifier(const QString &pnpinfo, bool
&hasIdentifier)
-{
- QString result = deviceProperty(pnpinfo, "vendor=");
- return result.toInt(&hasIdentifier, 16);
-}
-
-static QString deviceSerialNumber(const QString &pnpinfo)
-{
- QString serialNumber = deviceProperty(pnpinfo, "sernum=");
- serialNumber.remove(QLatin1Char('"'));
- return serialNumber;
-}
-
-// A 'desc' string contains the both description and manufacturer
-// properties, which are not possible to extract from the source
-// string. Besides, this string can contains an other information,
-// which should be excluded from the result.
-static QString deviceDescriptionAndManufacturer(const QString &desc)
-{
- const int classindex = desc.indexOf(QLatin1String(", class "));
- if (classindex == -1)
- return desc;
- return desc.mid(0, classindex);
-}
-
-struct NodeInfo
-{
- QString name;
- QString value;
-};
-
-static QVector<int> mibFromName(const QString &name)
-{
- size_t mibsize = 0;
- if (::sysctlnametomib(name.toLocal8Bit().constData(), Q_NULLPTR, &mibsize)
< 0
- || mibsize == 0) {
- return QVector<int>();
- }
- QVector<int> mib(mibsize);
- if (::sysctlnametomib(name.toLocal8Bit().constData(), &mib[0], &mibsize) <
0)
- return QVector<int>();
-
- return mib;
-}
-
-static QVector<int> nextOid(const QVector<int> &previousOid)
-{
- QVector<int> mib;
- mib.append(0); // Magic undocumented code (CTL_UNSPEC ?)
- mib.append(2); // Magic undocumented code
- foreach (int code, previousOid)
- mib.append(code);
-
- size_t requiredLength = 0;
- if (::sysctl(&mib[0], mib.count(), Q_NULLPTR, &requiredLength, Q_NULLPTR,
0) < 0)
- return QVector<int>();
- const size_t oidLength = requiredLength / sizeof(int);
- QVector<int> oid(oidLength, 0);
- if (::sysctl(&mib[0], mib.count(), &oid[0], &requiredLength, Q_NULLPTR, 0)
< 0)
- return QVector<int>();
-
- if (previousOid.first() != oid.first())
- return QVector<int>();
-
- return oid;
-}
-
-static NodeInfo nodeForOid(const QVector<int> &oid)
-{
- QVector<int> mib;
- mib.append(0); // Magic undocumented code (CTL_UNSPEC ?)
- mib.append(1); // Magic undocumented code
- foreach (int code, oid)
- mib.append(code);
-
- // query node name
- size_t requiredLength = 0;
- if (::sysctl(&mib[0], mib.count(), Q_NULLPTR, &requiredLength, Q_NULLPTR,
0) < 0)
- return NodeInfo();
- QByteArray name(requiredLength, 0);
- if (::sysctl(&mib[0], mib.count(), name.data(), &requiredLength,
Q_NULLPTR, 0) < 0)
- return NodeInfo();
-
- // query node value
- requiredLength = 0;
- if (::sysctl(&oid[0], oid.count(), Q_NULLPTR, &requiredLength, Q_NULLPTR,
0) < 0)
- return NodeInfo();
- QByteArray value(requiredLength, 0);
- if (::sysctl(&oid[0], oid.count(), value.data(), &requiredLength,
Q_NULLPTR, 0) < 0)
- return NodeInfo();
-
- // query value format
- mib[1] = 4; // Magic undocumented code
- requiredLength = 0;
- if (::sysctl(&mib[0], mib.count(), Q_NULLPTR, &requiredLength, Q_NULLPTR,
0) < 0)
- return NodeInfo();
- QByteArray buf(requiredLength, 0);
- if (::sysctl(&mib[0], mib.count(), buf.data(), &requiredLength, Q_NULLPTR,
0) < 0)
- return NodeInfo();
-
- QDataStream in(buf);
- in.setByteOrder(QDataStream::LittleEndian);
- quint32 kind = 0;
- qint8 format = 0;
- in >> kind >> format;
-
- NodeInfo result;
-
- // we need only the string-type value
- if (format == 'A') {
- result.name = QString::fromLocal8Bit(name.constData());
- result.value = QString::fromLocal8Bit(value.constData());
- }
-
- return result;
-}
-
-static QList<NodeInfo> enumerateDesiredNodes(const QVector<int> &mib)
-{
- QList<NodeInfo> nodes;
-
- QVector<int> oid = mib;
-
- forever {
- const QVector<int> nextoid = nextOid(oid);
- if (nextoid.isEmpty())
- break;
-
- const NodeInfo node = nodeForOid(nextoid);
- if (!node.name.isEmpty()) {
- if (node.name.endsWith("\%desc")
- || node.name.endsWith("\%pnpinfo")) {
- nodes.append(node);
- }
- }
-
- oid = nextoid;
- }
-
- return nodes;
-}
-
-QList<QSerialPortInfo> availablePortsBySysctl(bool &ok)
-{
- const QVector<int> mib = mibFromName(QLatin1String("dev"));
- if (mib.isEmpty()) {
- ok = false;
- return QList<QSerialPortInfo>();
- }
-
- const QList<NodeInfo> nodes = enumerateDesiredNodes(mib);
- if (nodes.isEmpty()) {
- ok = false;
- return QList<QSerialPortInfo>();
- }
-
- QDir deviceDir(QLatin1String("/dev"));
- if (!(deviceDir.exists() && deviceDir.isReadable())) {
- ok = false;
- return QList<QSerialPortInfo>();
- }
-
- deviceDir.setNameFilters(QStringList() << QLatin1String("cua*"));
- deviceDir.setFilter(QDir::Files | QDir::System | QDir::NoSymLinks);
-
- QList<QSerialPortInfo> serialPortInfoList;
-
- foreach (const QString &portName, deviceDir.entryList()) {
- if (portName.endsWith(QLatin1String(".init"))
- || portName.endsWith(QLatin1String(".lock"))) {
- continue;
- }
-
- QSerialPortInfoPrivate priv;
- priv.portName = portName;
- priv.device =
QSerialPortInfoPrivate::portNameToSystemLocation(portName);
-
- foreach (const NodeInfo &node, nodes) {
- const int pnpinfoindex =
node.name.indexOf(QLatin1String("\%pnpinfo"));
- if (pnpinfoindex == -1)
- continue;
-
- if (node.value.isEmpty())
- continue;
-
- QString ttyname = deviceName(node.value);
- if (ttyname.isEmpty())
- continue;
-
- const QString ttyportscount = deviceCount(node.value);
- if (ttyportscount.isEmpty())
- continue;
-
- const int count = ttyportscount.toInt();
- if (count == 0)
- continue;
- if (count > 1) {
- bool matched = false;
- for (int i = 0; i < count; ++i) {
- const QString ends =
QString(QLatin1String("%1.%2")).arg(ttyname).arg(i);
- if (portName.endsWith(ends)) {
- matched = true;
- break;
- }
- }
-
- if (!matched)
- continue;
- } else {
- if (!portName.endsWith(ttyname))
- continue;
- }
-
- priv.serialNumber = deviceSerialNumber(node.value);
- priv.vendorIdentifier = deviceVendorIdentifier(node.value,
priv.hasVendorIdentifier);
- priv.productIdentifier = deviceProductIdentifier(node.value,
priv.hasProductIdentifier);
-
- const QString nodebase = node.name.mid(0, pnpinfoindex);
- const QString descnode =
QString(QLatin1String("%1\%desc")).arg(nodebase);
-
- // search for description and manufacturer properties
- foreach (const NodeInfo &node, nodes) {
- if (node.name != descnode)
- continue;
-
- if (node.value.isEmpty())
- continue;
-
- // We can not separate the description and the manufacturer
- // properties from the node value, so lets just duplicate it.
- priv.description =
deviceDescriptionAndManufacturer(node.value);
- priv.manufacturer = priv.description;
- break;
- }
-
- break;
- }
-
- serialPortInfoList.append(priv);
- }
-
- ok = true;
- return serialPortInfoList;
-}
-
-#endif // Q_OS_FREEBSD
-
static bool isRfcommDevice(const QString &portName)
{
if (!portName.startsWith(QLatin1String("rfcomm")))
return false;
bool ok;
- const int portNumber = portName.mid(6).toInt(&ok);
+ const int portNumber = portName.midRef(6).toInt(&ok);
if (!ok || (portNumber < 0) || (portNumber > 255))
return false;
return true;
@@ -736,22 +453,12 @@
serialPortInfoList = availablePortsBySysfs(ok);
#endif
-#ifdef Q_OS_FREEBSD
- if (!ok)
- serialPortInfoList = availablePortsBySysctl(ok);
-#endif
-
if (!ok)
serialPortInfoList = availablePortsByFiltersOfDevices(ok);
return serialPortInfoList;
}
-QList<qint32> QSerialPortInfo::standardBaudRates()
-{
- return QSerialPortPrivate::standardBaudRates();
-}
-
#if QT_DEPRECATED_SINCE(5, 6)
bool QSerialPortInfo::isBusy() const
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo_win.cpp
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo_win.cpp
---
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo_win.cpp
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo_win.cpp
2016-05-20 08:00:50.000000000 +0200
@@ -264,16 +264,22 @@
return instanceIdentifier.mid(firstbound + 1, lastbound - firstbound - 1);
}
-static QString deviceSerialNumber(const QString &instanceIdentifier,
+static QString deviceSerialNumber(QString instanceIdentifier,
DEVINST deviceInstanceNumber)
{
- QString result = parseDeviceSerialNumber(instanceIdentifier);
- if (result.isEmpty()) {
- const DEVINST parentNumber =
parentDeviceInstanceNumber(deviceInstanceNumber);
- const QString parentInstanceIdentifier =
deviceInstanceIdentifier(parentNumber);
- result = parseDeviceSerialNumber(parentInstanceIdentifier);
+ forever {
+ const QString result = parseDeviceSerialNumber(instanceIdentifier);
+ if (!result.isEmpty())
+ return result;
+ deviceInstanceNumber =
parentDeviceInstanceNumber(deviceInstanceNumber);
+ if (deviceInstanceNumber == 0)
+ break;
+ instanceIdentifier = deviceInstanceIdentifier(deviceInstanceNumber);
+ if (instanceIdentifier.isEmpty())
+ break;
}
- return result;
+
+ return QString();
}
QList<QSerialPortInfo> QSerialPortInfo::availablePorts()
@@ -345,11 +351,6 @@
return serialPortInfoList;
}
-QList<qint32> QSerialPortInfo::standardBaudRates()
-{
- return QSerialPortPrivate::standardBaudRates();
-}
-
#if QT_DEPRECATED_SINCE(5, 6)
bool QSerialPortInfo::isBusy() const
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo_wince.cpp
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo_wince.cpp
---
old/qtserialport-opensource-src-5.6.0/src/serialport/qserialportinfo_wince.cpp
2016-02-18 08:26:48.000000000 +0100
+++
new/qtserialport-opensource-src-5.6.1/src/serialport/qserialportinfo_wince.cpp
2016-05-20 08:00:50.000000000 +0200
@@ -120,11 +120,6 @@
return serialPortInfoList;
}
-QList<qint32> QSerialPortInfo::standardBaudRates()
-{
- return QSerialPortPrivate::standardBaudRates();
-}
-
#if QT_DEPRECATED_SINCE(5, 6)
bool QSerialPortInfo::isBusy() const
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/serialport-lib.pri
new/qtserialport-opensource-src-5.6.1/src/serialport/serialport-lib.pri
--- old/qtserialport-opensource-src-5.6.0/src/serialport/serialport-lib.pri
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/src/serialport/serialport-lib.pri
2016-05-20 08:00:50.000000000 +0200
@@ -37,14 +37,17 @@
SOURCES += \
$$PWD/qserialport_unix.cpp
- !osx {
- SOURCES += \
- $$PWD/qserialportinfo_unix.cpp
- } else {
+ osx {
SOURCES += \
$$PWD/qserialportinfo_osx.cpp
LIBS_PRIVATE += -framework IOKit -framework CoreFoundation
+ } else:freebsd {
+ SOURCES += \
+ $$PWD/qserialportinfo_freebsd.cpp
+ } else {
+ SOURCES += \
+ $$PWD/qserialportinfo_unix.cpp
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtserialport-opensource-src-5.6.0/src/serialport/serialport.pro
new/qtserialport-opensource-src-5.6.1/src/serialport/serialport.pro
--- old/qtserialport-opensource-src-5.6.0/src/serialport/serialport.pro
2016-02-18 08:26:48.000000000 +0100
+++ new/qtserialport-opensource-src-5.6.1/src/serialport/serialport.pro
2016-05-20 08:00:50.000000000 +0200
@@ -5,8 +5,8 @@
config_ntddmodm: DEFINES += QT_NO_REDEFINE_GUID_DEVINTERFACE_MODEM
-load(qt_module)
-
include($$PWD/serialport-lib.pri)
+load(qt_module)
+
PRECOMPILED_HEADER =