Bug 399746 - USB info error
Summary: USB info error
Status: RESOLVED FIXED
Alias: None
Product: kinfocenter
Classification: Applications
Component: Device Viewer (show other bugs)
Version: 5.14.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Hubner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-13 08:37 UTC by proteus5
Modified: 2020-01-20 16:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.18.0
Sentry Crash Report:


Attachments
multiple devices (16.80 KB, image/png)
2018-10-13 08:37 UTC, proteus5
Details

Note You need to log in before you can comment on or make changes to this bug.
Description proteus5 2018-10-13 08:37:19 UTC
Created attachment 115616 [details]
multiple devices

SUMMARY


STEPS TO REPRODUCE
1. insert one or two USB to the front panel;
2. open the system information utility;
3. look at the USB information and the device information. 

OBSERVED RESULT
the device information shows useless data about the same devices once two USB devices are inserted in the slots; the USB information page doesn't show all the USB inserted devices.
I have only one optical device: sometimes even 6 optical devices appear.

EXPECTED RESULT
to fix the errors

SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.14.0
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
Kernel: 4.15.0.36
Comment 1 Harald Sitter 2020-01-20 16:34:15 UTC
Git commit d220002541b288232830460c35373becaf8661b7 by Harald Sitter.
Committed on 20/01/2020 at 16:32.
Pushed by sitter into branch 'Plasma/5.18'.

do not needlessly run through Solid::Device::allDevices

Summary:
allDevice is bugging out and having duplicated entires
https://bugs.kde.org/show_bug.cgi?id=416495
this results in garbage in our tree view.
on top of that running through allDevices is entirely pointless
as we can directly construct a Device from the udi we got which
is not only faster, it also lets us bypass the aformentioned
bug since the udi is still unique it's only the objects that
get duped
FIXED-IN: 5.18.0

Test Plan: repated plug/unplug of usb drive doesn't cause bogus device entries

Reviewers: apol, ngraham

Reviewed By: apol, ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26788

M  +43   -42   Modules/devinfo/devicelisting.cpp

https://commits.kde.org/kinfocenter/d220002541b288232830460c35373becaf8661b7