From 8ff62bd9536b5539e1e6b393c4ec87b092e36621 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Mon, 1 Jan 2018 18:01:51 +0100 Subject: TinyCAN: Intermediate fix for availableDevices() * Currently there is no way to detect the available devices * The existing code lead to compile errors with MSVC2013 * Also fix the documentation while at it [ChangeLog][QCanBus][Plugins] The function availableDevices() now returns an empty list for the TinyCAN plugin. The code was never functional and always returned a hardcoded example list. The function will be changed in later Qt versions to return the correct values once QTBUG-62958 is solved. Task-number: QTBUG-65474 Change-Id: Iebb4c8d4baf3b021d8890c6b3f252e9050856fce Reviewed-by: Alex Blasche --- src/plugins/canbus/tinycan/tinycanbackend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/canbus/tinycan') diff --git a/src/plugins/canbus/tinycan/tinycanbackend.cpp b/src/plugins/canbus/tinycan/tinycanbackend.cpp index 6405308..53b9872 100644 --- a/src/plugins/canbus/tinycan/tinycanbackend.cpp +++ b/src/plugins/canbus/tinycan/tinycanbackend.cpp @@ -70,7 +70,9 @@ bool TinyCanBackend::canCreate(QString *errorReason) QList TinyCanBackend::interfaces() { - return { createDeviceInfo(QStringLiteral("can0.0")), createDeviceInfo(QStringLiteral("can0.1")) }; + QList result; + result.append(createDeviceInfo(QStringLiteral("can0.0"))); + return result; } Q_GLOBAL_STATIC(QList, qChannels) -- cgit v1.2.3