forked from qt-creator/qt-creator
Android: Use QThread::sleep instead of STL
Change-Id: Ib16e8450732789e801f82e2d037b20868e444538 Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
e2c45012d6
commit
dd86735111
@@ -62,10 +62,9 @@
|
||||
#include <QSettings>
|
||||
#include <QStringList>
|
||||
#include <QTcpSocket>
|
||||
#include <QThread>
|
||||
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <thread>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
@@ -826,7 +825,7 @@ bool AndroidConfig::waitForBooted(const QString &serialNumber, const QFutureInte
|
||||
if (hasFinishedBooting(serialNumber)) {
|
||||
return true;
|
||||
} else {
|
||||
std::this_thread::sleep_for(std::chrono::seconds(2));
|
||||
QThread::sleep(2);
|
||||
if (!isConnected(serialNumber)) // device was disconnected
|
||||
return false;
|
||||
}
|
||||
@@ -845,7 +844,7 @@ QString AndroidConfig::waitForAvd(const QString &avdName, const QFutureInterface
|
||||
serialNumber = findAvd(avdName);
|
||||
if (!serialNumber.isEmpty())
|
||||
return waitForBooted(serialNumber, fi) ? serialNumber : QString();
|
||||
std::this_thread::sleep_for(std::chrono::seconds(2));
|
||||
QThread::sleep(2);
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user