summaryrefslogtreecommitdiffstats
path: root/src/plugins/canbus
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2017-10-25 12:58:09 +0200
committerAndré Hartmann <aha_1980@gmx.de>2017-10-25 12:48:38 +0000
commit60c0114e846a593895503a78d13b006f93e95675 (patch)
tree0b054d1fa2d819c00dff0f4325f870f616c55fe0 /src/plugins/canbus
parent9cfcc2f9868759dc679c0cf4532fb1c0883451d0 (diff)
SystecCAN: Fix availableDevices() for more than one device
initInfo->m_fTryNext is set to false when the callback is entered but must be set to true to continue with the next device. [ChangeLog][QCanBus][SystecCAN] Fixed that the function availableDevices() only returned the first device. Change-Id: I689564c2379a1db28cb7c623425aa261e44fdd4d Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/canbus')
-rw-r--r--src/plugins/canbus/systeccan/systeccanbackend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/canbus/systeccan/systeccanbackend.cpp b/src/plugins/canbus/systeccan/systeccanbackend.cpp
index ca63e86..2662c42 100644
--- a/src/plugins/canbus/systeccan/systeccanbackend.cpp
+++ b/src/plugins/canbus/systeccan/systeccanbackend.cpp
@@ -69,11 +69,12 @@ static void DRV_CALLBACK_TYPE ucanEnumCallback(DWORD index, BOOL isUsed,
Q_UNUSED(index);
Q_UNUSED(isUsed);
- Q_UNUSED(initInfo);
result->append(QString::fromLatin1("can%1.0").arg(hardwareInfo->m_bDeviceNr));
if (USBCAN_CHECK_SUPPORT_TWO_CHANNEL(hardwareInfo))
result->append(QString::fromLatin1("can%1.1").arg(hardwareInfo->m_bDeviceNr));
+
+ initInfo->m_fTryNext = true; // continue enumerating with next device
}
QList<QCanBusDeviceInfo> SystecCanBackend::interfaces()