[kde-freebsd] KDE/kdebase/workspace/kinfocenter/Modules/usbview
Raphael Kubo da Costa
kubito at gmail.com
Tue Jun 8 01:58:29 CEST 2010
SVN commit 1135707 by rkcosta:
Implement a dummy version of parse() for FreeBSD 8.0+ so that we don't have a missing symbol.
Additionally, implement a dummy version of parseSys(), even though it will never be called currently, and add some Q_UNUSED() calls to make -pedantic happier.
CC'ing the kde-freebsd mailing list so that the patch can be applied to the ports tree.
BUG: 240884
CCMAIL: kde-freebsd at kde.org
M +26 -2 usbdevices.cpp
--- trunk/KDE/kdebase/workspace/kinfocenter/Modules/usbview/usbdevices.cpp #1135706:1135707
@@ -290,12 +290,32 @@
return d.count();
}
-#elif (defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)) && !defined(DISABLE_USBDEVICES_FREEBSD)
+#else
+
+// Unused by *BSD
+bool USBDevice::parseSys(const QString &fname)
+{
+ Q_UNUSED(fname)
+
+ return true;
+}
+
+# if defined(DISABLE_USBDEVICES_FREEBSD)
+
/*
* FIXME: The USB subsystem has changed a lot in FreeBSD 8.0
* Support for it must be written.
*/
+bool USBDevice::parse(const QString &fname)
+{
+ Q_UNUSED(fname)
+
+ return true;
+}
+
+# else
+
/*
* FreeBSD support by Markus Brueffer <markus at brueffer.de>
*
@@ -367,6 +387,8 @@
bool USBDevice::parse(const QString &fname)
{
+ Q_UNUSED(fname)
+
static bool showErrorMessage = true;
bool error = false;
_devices.clear();
@@ -408,4 +430,6 @@
return true;
}
-#endif
+
+# endif // defined(DISABLE_USBDEVICES_FREEBSD)
+#endif // !(defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD))
More information about the kde-freebsd
mailing list