From 1389e296969df0acf7f393b698a3a0f1fb572026 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Wed, 12 May 2021 20:17:47 +0200 Subject: 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gregory guy Signed-off-by: Slávek Banko --- kcontrol/usbview/usbdb.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'kcontrol/usbview/usbdb.cpp') 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; -- cgit v1.2.1