diff options
author | Rainer Keller <rainer.keller@theqtcompany.com> | 2014-11-24 14:05:09 +0100 |
---|---|---|
committer | Rainer Keller <rainer.keller@theqtcompany.com> | 2014-11-25 09:34:15 +0200 |
commit | f250ce4f104cd0825f7cdfdeafdf763789d9d3eb (patch) | |
tree | ec5973f1a66b27293397c5e3a87124bfeef03dad | |
parent | 8e06cd81b6507e68a34cd2a05f93dbf644d3270c (diff) |
b2qt-flashing-wizard: Prevent flashing wrong Android image to Nexus
Change-Id: I57a3a1853ee49860a26d6de4837228f466c04d03
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
-rw-r--r-- | src/b2qt-flashing-wizard/device_page.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/b2qt-flashing-wizard/device_page.cpp b/src/b2qt-flashing-wizard/device_page.cpp index 37358bb..f6c146a 100644 --- a/src/b2qt-flashing-wizard/device_page.cpp +++ b/src/b2qt-flashing-wizard/device_page.cpp @@ -20,13 +20,14 @@ #include "device_page.h" #include "common.h" #include "mainwindow.h" // for Page_ enum -#include <QRadioButton> -#include <QLayout> #include <QDebug> #include <QDir> -#include <QListWidget> #include <QLabel> +#include <QLayout> +#include <QListWidget> +#include <QMessageBox> #include <QProcess> +#include <QRadioButton> #include <QTimer> extern QString G_SDKDIR; @@ -254,6 +255,12 @@ bool DevicePage::validatePage() DeviceInfo deviceInfo = mDeviceInfo[serial]; if (deviceInfo.state != "ready") { + QMessageBox::critical(this, tr("Wrong device status"), tr("The selected device is not ready.")); + return false; + } + + if (deviceInfo.name.toLower() != G_board.toLower()) { + QMessageBox::critical(this, tr("Wrong device type"), tr("The selected device is not compatible for this platform.")); return false; } |