From 98691947d1aa6fb3ab63c7b749bc6407fa01be8a Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Wed, 21 Jul 2021 20:07:30 +0200 Subject: 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 Reviewed-by: Qt CI Bot --- src/plugins/canbus/socketcan/socketcanbackend.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/canbus/socketcan/socketcanbackend.cpp') 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 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(), -- cgit v1.2.3