Immediately return the default device if is found

Task-number: QTCREATORBUG-15422
Change-Id: I7be44fbe43c320c171ffb724ffd25414e184fd9a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
BogDan Vatra
2015-12-04 10:03:45 +02:00
parent 255611f3e7
commit 957c0af570
5 changed files with 45 additions and 75 deletions

View File

@@ -60,9 +60,8 @@ public:
~AndroidDeviceDialog();
AndroidDeviceInfo device();
void accept();
bool saveDeviceSelection();
bool saveDeviceSelection() const;
private slots:
void refreshDeviceList();
@@ -71,12 +70,8 @@ private slots:
void showHelp();
void avdAdded();
private:
static QVector<AndroidDeviceInfo> refreshDevices(const QString &adbToolPath,
const QString &androidToolPath,
const Utils::Environment &environment);
void devicesRefreshed();
void enableOkayButton();
void useDefaultDevice();
void defaultDeviceClear();
AndroidDeviceModel *m_model;
@@ -86,7 +81,7 @@ private:
QString m_abi;
QString m_avdNameFromAdd;
QString m_defaultDevice;
QTime m_defaultDeviceTimer;
QVector<AndroidDeviceInfo> m_connectedDevices;
QFutureWatcher<AndroidConfig::CreateAvdInfo> m_futureWatcherAddDevice;
QFutureWatcher<QVector<AndroidDeviceInfo>> m_futureWatcherRefreshDevices;
};