summaryrefslogtreecommitdiff
blob: a29f71f7786b2aed8d98818f8357f4ff70140df2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From e556c25c888a6e16e818945ac5bc81e455ddd4bc Mon Sep 17 00:00:00 2001
From: Alexandre Ferreira <alexandref75@gmail.com>
Date: Tue, 15 Jan 2019 13:29:25 +0000
Subject: Fix USB view

Summary:
Fix
BUG: 402949

Reviewers: #plasma, cfeck, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: asturmlechner, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18032
---
 Modules/usbview/usbdb.cpp      | 3 +++
 Modules/usbview/usbdevices.cpp | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Modules/usbview/usbdb.cpp b/Modules/usbview/usbdb.cpp
index 2c62f16..e68d5c0 100644
--- a/Modules/usbview/usbdb.cpp
+++ b/Modules/usbview/usbdb.cpp
@@ -21,6 +21,9 @@
 USBDB::USBDB() {
 	QString db = QStringLiteral("/usr/share/hwdata/usb.ids"); /* on Fedora and Arch*/
 	if (!QFile::exists(db)) {
+		db = QStringLiteral("/usr/share/misc/usb.ids"); /* on Gentoo */
+	}
+	if (!QFile::exists(db)) {
                 //cannot use locate(AppDataLocation) as the app is kinfocenter
 		db = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kcmusb"), QStandardPaths::LocateDirectory);
                 if (!db.isEmpty())
diff --git a/Modules/usbview/usbdevices.cpp b/Modules/usbview/usbdevices.cpp
index 1fb32e7..7b6fe1c 100644
--- a/Modules/usbview/usbdevices.cpp
+++ b/Modules/usbview/usbdevices.cpp
@@ -103,7 +103,7 @@ void USBDevice::parseSysDir(int bus, int parent, int level, const QString& dname
 			continue;
 
 		USBDevice* dev = new USBDevice();
-        dev->parseSysDir(bus, ++level, _device, dname + QLatin1Char('/') + *it);
+        dev->parseSysDir(bus, _device, ++level, dname + QLatin1Char('/') + *it);
 	}
 }
 
-- 
cgit v1.1