add support for identifying old devices in CableInfoWidget

This commit is contained in:
uncor3
2026-04-10 08:48:18 +00:00
parent 7e918c1712
commit 4305fafbd6
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -151,6 +151,7 @@ void CableInfoWidget::analyzeCableInfo()
"Failed to find plist dictionary in response.");
return;
}
m_cableInfo.isOldDevice = !ioreg["ConnectionActive"].valid();
m_cableInfo.isConnected = ioreg["ConnectionActive"].getBool();
// Check if genuine (Apple manufacturer and valid model info)
@@ -254,7 +255,8 @@ void CableInfoWidget::updateUI()
delete item;
}
if (!m_cableInfo.isConnected) {
// old devices don't report ConnectionActive
if (!m_cableInfo.isConnected && !m_cableInfo.isOldDevice) {
m_loadingWidget->showError(
QString("%1 does not seem to be connected to any cable.")
.arg(QString::fromStdString(m_device->deviceInfo.productType)));
+2
View File
@@ -67,6 +67,8 @@ private:
QStringList supportedTransports;
QStringList activeTransports;
bool isFakeInfo = false;
bool isOldDevice =
false; // devices that don't report ConnectionActive are likely old
};
// UI components