summaryrefslogtreecommitdiffstats
path: root/src/plugins/canbus/socketcan/socketcanbackend.cpp
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2021-07-21 20:07:30 +0200
committerAndre Hartmann <aha_1980@gmx.de>2021-07-23 09:58:05 +0200
commit98691947d1aa6fb3ab63c7b749bc6407fa01be8a (patch)
tree87df742ff3539404283d3ea388fcb6568afefef2 /src/plugins/canbus/socketcan/socketcanbackend.cpp
parent8199ed388753dda6239a597fb4bb7acba664f73e (diff)
QCanBusDevice: Consolidate createDeviceInfo()
This protected function is used from the CAN plugins to create QCanBusDeviceInfo objects. We want to add another parameter (plugin) to the function in a follow-up commit, so let's first remove unneeded overloads that were created during Qt 5 times and only keep the very simple and the all-embracing one. While at it, remove the std::move calls as clang gives performance warnings here: socketcanbackend.cpp:149:23: error: moving a temporary object prevents copy elision socketcanbackend.cpp:149:23: note: remove std::move call here Pick-to: 6.2 Change-Id: Ie83db3cd3a9d6b40b2da4a9ce736861a0ee8359f Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/plugins/canbus/socketcan/socketcanbackend.cpp')
-rw-r--r--src/plugins/canbus/socketcan/socketcanbackend.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/canbus/socketcan/socketcanbackend.cpp b/src/plugins/canbus/socketcan/socketcanbackend.cpp
index 134596d..69dce97 100644
--- a/src/plugins/canbus/socketcan/socketcanbackend.cpp
+++ b/src/plugins/canbus/socketcan/socketcanbackend.cpp
@@ -146,9 +146,9 @@ QList<QCanBusDeviceInfo> SocketCanBackend::interfaces()
const QString serial;
const QString description = deviceDescription(deviceName);
const int channel = deviceChannel(deviceName);
- result.append(std::move(createDeviceInfo(deviceName, serial, description,
- channel, isVirtual(deviceName),
- isFlexibleDataRateCapable(deviceName))));
+ result.append(createDeviceInfo(deviceName, serial, description,
+ QString(), channel, isVirtual(deviceName),
+ isFlexibleDataRateCapable(deviceName)));
}
std::sort(result.begin(), result.end(),