diff options
author | gregory guy <[email protected]> | 2021-05-12 20:17:47 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2021-05-18 02:12:37 +0200 |
commit | 9bdd3a0e4724a591f0cdc6dd8bdd60dc794354e4 (patch) | |
tree | e1f3c78fd2ad1f6186821bc2a97e765cc9012307 /kcontrol/usbview/usbdb.cpp | |
parent | 865e10771879338bfdab0f0a2adb387fd3c44b50 (diff) | |
download | tdebase-9bdd3a0e4724a591f0cdc6dd8bdd60dc794354e4.tar.gz tdebase-9bdd3a0e4724a591f0cdc6dd8bdd60dc794354e4.zip |
Make the option -DWITH_USBIDS more visible for packagers.
Look for installed usb.ids file, if not found, default to the one provided in source.
usb.ids file has been updated to Version 2021.03.31
Signed-off-by: gregory guy <[email protected]>
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 1389e296969df0acf7f393b698a3a0f1fb572026)
Diffstat (limited to 'kcontrol/usbview/usbdb.cpp')
-rw-r--r-- | kcontrol/usbview/usbdb.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/kcontrol/usbview/usbdb.cpp b/kcontrol/usbview/usbdb.cpp index c786ca40e..be5f3b63a 100644 --- a/kcontrol/usbview/usbdb.cpp +++ b/kcontrol/usbview/usbdb.cpp @@ -22,16 +22,13 @@ #include "usbdb.h" - USBDB::USBDB() { -#ifndef USBIDS_FILE - TQString db = "/usr/share/hwdata/usb.ids"; /* on Fedora */ - if (!TQFile::exists(db)) - db = locate("data", "kcmusb/usb.ids"); -#else TQString db = USBIDS_FILE; -#endif + + if (!TQFile::exists(db)) + TQString db = locate("data", "kcmusb/usb.ids"); + if (db.isEmpty()) return; |