diff options
Diffstat (limited to 'rbutil/rbutilqt/autodetection.cpp')
-rw-r--r-- | rbutil/rbutilqt/autodetection.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/autodetection.cpp b/rbutil/rbutilqt/autodetection.cpp index 7c194c8bbf..3684d55908 100644 --- a/rbutil/rbutilqt/autodetection.cpp +++ b/rbutil/rbutilqt/autodetection.cpp | |||
@@ -172,7 +172,7 @@ bool Autodetection::detect() | |||
172 | return true; | 172 | return true; |
173 | } | 173 | } |
174 | 174 | ||
175 | if(m_mountpoint.isEmpty() && m_device.isEmpty() && m_errdev.isEmpty()) | 175 | if(m_mountpoint.isEmpty() && m_device.isEmpty() && m_errdev.isEmpty() && m_incompat.isEmpty()) |
176 | return false; | 176 | return false; |
177 | return true; | 177 | return true; |
178 | } | 178 | } |
@@ -262,6 +262,7 @@ bool Autodetection::detectUsb() | |||
262 | // the ini file needs to hold the IDs as hex values. | 262 | // the ini file needs to hold the IDs as hex values. |
263 | QMap<int, QString> usbids = settings->usbIdMap(); | 263 | QMap<int, QString> usbids = settings->usbIdMap(); |
264 | QMap<int, QString> usberror = settings->usbIdErrorMap(); | 264 | QMap<int, QString> usberror = settings->usbIdErrorMap(); |
265 | QMap<int, QString> usbincompat = settings->usbIdIncompatMap(); | ||
265 | 266 | ||
266 | // usb pid detection | 267 | // usb pid detection |
267 | #if defined(Q_OS_LINUX) | defined(Q_OS_MACX) | 268 | #if defined(Q_OS_LINUX) | defined(Q_OS_MACX) |
@@ -293,6 +294,11 @@ bool Autodetection::detectUsb() | |||
293 | qDebug() << "detected device with problems via usb!"; | 294 | qDebug() << "detected device with problems via usb!"; |
294 | return true; | 295 | return true; |
295 | } | 296 | } |
297 | if(usbincompat.contains(id)) { | ||
298 | m_incompat = usbincompat.value(id); | ||
299 | qDebug() << "detected incompatible player variant"; | ||
300 | return true; | ||
301 | } | ||
296 | u = u->next; | 302 | u = u->next; |
297 | } | 303 | } |
298 | } | 304 | } |
@@ -371,6 +377,14 @@ bool Autodetection::detectUsb() | |||
371 | qDebug() << "detected device with problems via usb!"; | 377 | qDebug() << "detected device with problems via usb!"; |
372 | return true; | 378 | return true; |
373 | } | 379 | } |
380 | if(usbincompat.contains(id)) { | ||
381 | m_incompat = usbincompat.value(id); | ||
382 | // we detected an incompatible player variant | ||
383 | if(buffer) free(buffer); | ||
384 | SetupDiDestroyDeviceInfoList(deviceInfo); | ||
385 | qDebug() << "detectUsb: detected incompatible variant"; | ||
386 | return true; | ||
387 | } | ||
374 | } | 388 | } |
375 | if(buffer) free(buffer); | 389 | if(buffer) free(buffer); |
376 | } | 390 | } |