Android: Handle offline state

Task-number: QTCREATORBUG-11056
Change-Id: I81b58d08b66b4fb8322e5c6c4935ddfb9470318f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
Daniel Teske
2014-03-10 15:18:46 +01:00
parent 3befd91113
commit 77d885bf3a
3 changed files with 13 additions and 3 deletions

View File

@@ -331,9 +331,12 @@ void AndroidDeviceModel::setDevices(const QVector<AndroidDeviceInfo> &devices)
AndroidDeviceModelNode *incompatibleDevices = 0; // created on demand
foreach (const AndroidDeviceInfo &device, devices) {
QString error;
if (device.unauthorized) {
if (device.state == AndroidDeviceInfo::UnAuthorizedState) {
error = AndroidDeviceDialog::tr("Unauthorized. Please check the confirmation dialog on your device %1.")
.arg(device.serialNumber);
}else if (device.state == AndroidDeviceInfo::OfflineState) {
error = AndroidDeviceDialog::tr("Offline. Please check the state of your device %1.")
.arg(device.serialNumber);
} else if (!device.cpuAbi.contains(m_abi)) {
error = AndroidDeviceDialog::tr("ABI is incompatible, device supports ABIs: %1.")
.arg(device.cpuAbi.join(QLatin1String(" ")));