diff -Nru qtusb-0.6.3/debian/changelog qtusb-0.6.5/debian/changelog --- qtusb-0.6.3/debian/changelog 2019-03-21 12:36:52.000000000 +0000 +++ qtusb-0.6.5/debian/changelog 2019-03-21 12:36:52.000000000 +0000 @@ -1,4 +1,4 @@ -qtusb (0.6.3-focal1) focal; urgency=medium +qtusb (0.6.5-focal1) focal; urgency=medium * Automatic build. diff -Nru qtusb-0.6.3/include/QtUsb/0.6.5/QtUsb/private/qhiddevice_p.h qtusb-0.6.5/include/QtUsb/0.6.5/QtUsb/private/qhiddevice_p.h --- qtusb-0.6.3/include/QtUsb/0.6.5/QtUsb/private/qhiddevice_p.h 1970-01-01 00:00:00.000000000 +0000 +++ qtusb-0.6.5/include/QtUsb/0.6.5/QtUsb/private/qhiddevice_p.h 2019-03-21 12:36:52.000000000 +0000 @@ -0,0 +1 @@ +#include "../../../../../src/usb/qhiddevice_p.h" diff -Nru qtusb-0.6.3/include/QtUsb/0.6.5/QtUsb/private/qusbdevice_p.h qtusb-0.6.5/include/QtUsb/0.6.5/QtUsb/private/qusbdevice_p.h --- qtusb-0.6.3/include/QtUsb/0.6.5/QtUsb/private/qusbdevice_p.h 1970-01-01 00:00:00.000000000 +0000 +++ qtusb-0.6.5/include/QtUsb/0.6.5/QtUsb/private/qusbdevice_p.h 2019-03-21 12:36:52.000000000 +0000 @@ -0,0 +1 @@ +#include "../../../../../src/usb/qusbdevice_p.h" diff -Nru qtusb-0.6.3/include/QtUsb/0.6.5/QtUsb/private/qusbendpoint_p.h qtusb-0.6.5/include/QtUsb/0.6.5/QtUsb/private/qusbendpoint_p.h --- qtusb-0.6.3/include/QtUsb/0.6.5/QtUsb/private/qusbendpoint_p.h 1970-01-01 00:00:00.000000000 +0000 +++ qtusb-0.6.5/include/QtUsb/0.6.5/QtUsb/private/qusbendpoint_p.h 2019-03-21 12:36:52.000000000 +0000 @@ -0,0 +1 @@ +#include "../../../../../src/usb/qusbendpoint_p.h" diff -Nru qtusb-0.6.3/include/QtUsb/0.6.5/QtUsb/private/qusbinfo_p.h qtusb-0.6.5/include/QtUsb/0.6.5/QtUsb/private/qusbinfo_p.h --- qtusb-0.6.3/include/QtUsb/0.6.5/QtUsb/private/qusbinfo_p.h 1970-01-01 00:00:00.000000000 +0000 +++ qtusb-0.6.5/include/QtUsb/0.6.5/QtUsb/private/qusbinfo_p.h 2019-03-21 12:36:52.000000000 +0000 @@ -0,0 +1 @@ +#include "../../../../../src/usb/qusbinfo_p.h" diff -Nru qtusb-0.6.3/include/QtUsb/headers.pri qtusb-0.6.5/include/QtUsb/headers.pri --- qtusb-0.6.3/include/QtUsb/headers.pri 2019-03-21 12:36:52.000000000 +0000 +++ qtusb-0.6.5/include/QtUsb/headers.pri 2019-03-21 12:36:52.000000000 +0000 @@ -1,6 +1,6 @@ -SYNCQT.HEADER_FILES = qhiddevice.h qusbdevice.h qusbendpoint.h qusbglobal.h qusbinfo.h +SYNCQT.HEADER_FILES = qhiddevice.h qusbdevice.h qusbendpoint.h qusbinfo.h SYNCQT.GENERATED_HEADER_FILES = QHidDevice QUsbDevice QUsbEndpoint QUsbInfo qtusbversion.h QtUsbVersion QtUsb SYNCQT.PRIVATE_HEADER_FILES = qhiddevice_p.h qusbdevice_p.h qusbendpoint_p.h qusbinfo_p.h SYNCQT.QPA_HEADER_FILES = -SYNCQT.CLEAN_HEADER_FILES = qhiddevice.h qusbdevice.h qusbendpoint.h qusbglobal.h qusbinfo.h +SYNCQT.CLEAN_HEADER_FILES = qhiddevice.h qusbdevice.h qusbendpoint.h qusbinfo.h SYNCQT.INJECTIONS = diff -Nru qtusb-0.6.3/include/QtUsb/QtUsb qtusb-0.6.5/include/QtUsb/QtUsb --- qtusb-0.6.3/include/QtUsb/QtUsb 2019-03-21 12:36:52.000000000 +0000 +++ qtusb-0.6.5/include/QtUsb/QtUsb 2019-03-21 12:36:52.000000000 +0000 @@ -1,7 +1,6 @@ #ifndef QT_QTUSB_MODULE_H #define QT_QTUSB_MODULE_H #include -#include "qusbglobal.h" #include "qhiddevice.h" #include "qusbdevice.h" #include "qusbendpoint.h" diff -Nru qtusb-0.6.3/include/QtUsb/qtusbversion.h qtusb-0.6.5/include/QtUsb/qtusbversion.h --- qtusb-0.6.3/include/QtUsb/qtusbversion.h 2019-03-21 12:36:52.000000000 +0000 +++ qtusb-0.6.5/include/QtUsb/qtusbversion.h 2019-03-21 12:36:52.000000000 +0000 @@ -2,8 +2,8 @@ #ifndef QT_QTUSB_VERSION_H #define QT_QTUSB_VERSION_H -#define QTUSB_VERSION_STR "0.6.3" +#define QTUSB_VERSION_STR "0.6.5" -#define QTUSB_VERSION 0x000603 +#define QTUSB_VERSION 0x000605 #endif // QT_QTUSB_VERSION_H diff -Nru qtusb-0.6.3/.qmake.conf qtusb-0.6.5/.qmake.conf --- qtusb-0.6.3/.qmake.conf 2019-03-21 12:36:52.000000000 +0000 +++ qtusb-0.6.5/.qmake.conf 2019-03-21 12:36:52.000000000 +0000 @@ -2,4 +2,4 @@ CONFIG += warning_clean CONFIG -= create_cmake CMAKE_MODULE_TESTS = '-' -MODULE_VERSION = 0.6.3 +MODULE_VERSION = 0.6.5 diff -Nru qtusb-0.6.3/src/usb/qusbdevice.cpp qtusb-0.6.5/src/usb/qusbdevice.cpp --- qtusb-0.6.3/src/usb/qusbdevice.cpp 2019-03-21 12:36:52.000000000 +0000 +++ qtusb-0.6.5/src/usb/qusbdevice.cpp 2019-03-21 12:36:52.000000000 +0000 @@ -440,6 +440,9 @@ break; } + if (!d->m_events->isRunning()) // if event handling thread is not running start it. The thread was stopped upon closing the device. + d->m_events->start(); + m_connected = true; emit connectionChanged(m_connected); @@ -461,11 +464,15 @@ libusb_release_interface(d->m_devHandle, 0); // release the claimed interface libusb_close(d->m_devHandle); // close the device we opened + d->m_events->exit(0); // stop event handling thread + d->m_events->wait(); d->m_devHandle = Q_NULLPTR; + m_connected = false; + emit connectionChanged(m_connected); + } else { // do not emit signal if device is already closed. + if (m_log_level >= logInfo) + qInfo("USB connection already closed"); } - - m_connected = false; - emit connectionChanged(m_connected); } /*! diff -Nru qtusb-0.6.3/src/usb/qusbendpoint.cpp qtusb-0.6.5/src/usb/qusbendpoint.cpp --- qtusb-0.6.3/src/usb/qusbendpoint.cpp 2019-03-21 12:36:52.000000000 +0000 +++ qtusb-0.6.5/src/usb/qusbendpoint.cpp 2019-03-21 12:36:52.000000000 +0000 @@ -687,7 +687,7 @@ if (maxSize <= 0) return 0; - QMutexLocker(&d->m_buf_mutex); + QMutexLocker locker(&d->m_buf_mutex); qint64 read_size = d->m_buf.size(); if (read_size == 0) return 0; diff -Nru qtusb-0.6.3/src/usb/qusbendpoint.h qtusb-0.6.5/src/usb/qusbendpoint.h --- qtusb-0.6.3/src/usb/qusbendpoint.h 2019-03-21 12:36:52.000000000 +0000 +++ qtusb-0.6.5/src/usb/qusbendpoint.h 2019-03-21 12:36:52.000000000 +0000 @@ -34,10 +34,10 @@ Q_ENUM(Status) enum bmRequestType : quint8 { - requestStandard = (0x00 < 5), - requestClass = (0x01 < 5), - requestVendor = (0x02 < 5), - requestReserved = (0x03 < 5), + requestStandard = (0x00 << 5), + requestClass = (0x01 << 5), + requestVendor = (0x02 << 5), + requestReserved = (0x03 << 5), recipientDevice = 0x00, recipientInterface = 0x01, recipientEndpoint = 0x02, diff -Nru qtusb-0.6.3/version qtusb-0.6.5/version --- qtusb-0.6.3/version 2019-03-21 12:36:52.000000000 +0000 +++ qtusb-0.6.5/version 2019-03-21 12:36:52.000000000 +0000 @@ -1 +1 @@ -0.6.3 \ No newline at end of file +0.6.5 \ No newline at end of file