
From 74ec545bf871171e23968f1e484a6250d46bdc51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Mon, 11 Feb 2019 15:53:20 +1000
Subject: Add filteredDeviceFilePaths for Haiku's /dev/ports/*


diff --git a/src/serialport/qserialportinfo_unix.cpp b/src/serialport/qserialportinfo_unix.cpp
index 105d10a..80932e9 100644
--- a/src/serialport/qserialportinfo_unix.cpp
+++ b/src/serialport/qserialportinfo_unix.cpp
@@ -79,13 +79,20 @@ static QStringList filteredDeviceFilePaths()
     << QStringLiteral("cu*");
 #elif defined(Q_OS_QNX)
     << QStringLiteral("ser*");
+#elif defined(Q_OS_HAIKU)
+    << QStringLiteral("*serial*")
+    << QStringLiteral("usb*");
 #else
     ;
 #endif
 
     QStringList result;
 
+#if defined(Q_OS_HAIKU)
+    QDir deviceDir(QStringLiteral("/dev/ports"));
+#else
     QDir deviceDir(QStringLiteral("/dev"));
+#endif
     if (deviceDir.exists()) {
         deviceDir.setNameFilters(deviceFileNameFilterList);
         deviceDir.setFilter(QDir::Files | QDir::System | QDir::NoSymLinks);
-- 
2.28.0

