mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-04 00:08:36 +03:00
add Qt6-only version with qhexedit2-0.8.x depends Signed-off-by: Victor Kustov <ktrace@yandex.ru> Part-of: https://github.com/gentoo/gentoo/pull/41991 Closes: https://github.com/gentoo/gentoo/pull/41991 Signed-off-by: Sam James <sam@gentoo.org>
42 lines
932 B
Diff
42 lines
932 B
Diff
See https://github.com/lancos/ponyprog/issues/42
|
|
---
|
|
|
|
diff --git a/SrcPony/usbwatcher.h b/SrcPony/usbwatcher.h
|
|
index eeb0163..d7ab2c5 100644
|
|
--- a/SrcPony/usbwatcher.h
|
|
+++ b/SrcPony/usbwatcher.h
|
|
@@ -51,20 +51,22 @@ class USBWatcher : public QObject
|
|
|
|
void hotplug_notify(bool connected, quint16 vid, quint16 pid)
|
|
{
|
|
+ VidPid *vObj = new VidPid(vid, pid);
|
|
if (connected)
|
|
{
|
|
- vUSB.append(VidPid(vid, pid));
|
|
+ vUSB.append(vObj);
|
|
emit notify(true, vid, pid);
|
|
}
|
|
else
|
|
{
|
|
- int idx = vUSB.indexOf(VidPid(vid, pid));
|
|
+ int idx = vUSB.indexOf(vObj);
|
|
if (idx != -1)
|
|
{
|
|
vUSB.remove(idx);
|
|
}
|
|
emit notify(false, vid, pid);
|
|
}
|
|
+ delete vObj;
|
|
}
|
|
|
|
signals:
|
|
@@ -76,7 +78,7 @@ class USBWatcher : public QObject
|
|
private:
|
|
void hotplug_deregister();
|
|
|
|
- QVector <VidPid> vUSB;
|
|
+ QVector <VidPid *> vUSB;
|
|
libusb_hotplug_callback_handle cbHandle;
|
|
libusb_context *usb_ctx;
|
|
QTimer *timer;
|