Skip to content

Commit

Permalink
Adding missing meta types registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoussin committed Aug 31, 2020
1 parent 34d9203 commit e9652f8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/usb/qusbdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ QUsbDevice::QUsbDevice(QObject *parent)
m_status = statusOK;
this->setLogLevel(m_log_level); // Apply log level to libusb

qRegisterMetaType<QUsbDevice::DeviceStatus>("QUsbDevice::DeviceStatus");

Q_D(QUsbDevice);
if (libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG) != 0) {

Expand Down
2 changes: 1 addition & 1 deletion src/usb/qusbdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Q_USB_EXPORT QUsbDevice : public QObject
private:
void handleUsbError(int error_code);

signals:
Q_SIGNALS:
void statusChanged(QUsbDevice::DeviceStatus status);
void connectionChanged(bool connected);

Expand Down
3 changes: 3 additions & 0 deletions src/usb/qusbendpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,11 @@ QUsbEndpoint::QUsbEndpoint(QUsbDevice *dev, QUsbEndpoint::Type type, quint8 ep)
: QIODevice(*(new QUsbEndpointPrivate)), d_dummy(Q_NULLPTR), m_status(QUsbEndpoint::transferCanceled), m_dev(dev), m_type(type), m_ep(ep)
{
Q_CHECK_PTR(dev);
qRegisterMetaType<QUsbEndpoint::Status>("QUsbEndpoint::Status");

Q_D(QUsbEndpoint);
DbgPrintFuncName();

setParent(dev);
}

Expand Down
6 changes: 3 additions & 3 deletions src/usb/qusbinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ QUsbInfo::QUsbInfo(QObject *parent)
DbgPrintFuncName();
int rc;

qRegisterMetaType<QUsbDevice::Id>("QUsbDevice::DeviceFilter");
qRegisterMetaType<QUsbDevice::Config>("QUsbDevice::DeviceConfig");
qRegisterMetaType<QUsbDevice::Id>("QUsbDevice::Id");
qRegisterMetaType<QUsbDevice::Config>("QUsbDevice::Config");

qRegisterMetaType<QUsbDevice::IdList>("QUsbDevice::FilterList");
qRegisterMetaType<QUsbDevice::IdList>("QUsbDevice::IdList");
qRegisterMetaType<QUsbDevice::ConfigList>("QUsbDevice::ConfigList");

rc = libusb_init(&d->m_ctx);
Expand Down

0 comments on commit e9652f8

Please sign in to comment.