summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Ferreira <[email protected]>2019-01-15 13:29:25 +0000
committerDavid Edmundson <[email protected]>2019-01-15 14:11:28 +0000
commite556c25c888a6e16e818945ac5bc81e455ddd4bc (patch)
tree6dd0fcaedd24f38a2471fabcb1769a9021f77f23
parent2a72522a6af21e447ae9af6a9ce2739d3536a2ff (diff)
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
-rw-r--r--Modules/usbview/usbdb.cpp3
-rw-r--r--Modules/usbview/usbdevices.cpp2
2 files changed, 4 insertions, 1 deletions
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);
}
}