forked from qt-creator/qt-creator
Utils: Introduce sleep function
Use it in Android plugin Change-Id: Id3ae707d5425e99a2e5b993e1ed98dddd73809a9 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -17,6 +17,7 @@ QtcPlugin {
|
||||
Depends { name: "QtSupport" }
|
||||
Depends { name: "TextEditor" }
|
||||
Depends { name: "AnalyzerBase" }
|
||||
Depends { name: "Utils" }
|
||||
Depends { name: "Qt"; submodules: ["widgets", "xml", "network"] }
|
||||
|
||||
property bool enable: false
|
||||
|
||||
@@ -8,6 +8,9 @@ QTC_PLUGIN_DEPENDS += \
|
||||
texteditor \
|
||||
analyzerbase
|
||||
|
||||
QTC_LIB_DEPENDS += \
|
||||
utils
|
||||
|
||||
exists(../../shared/qbs/qbs.pro): \
|
||||
QTC_PLUGIN_DEPENDS += \
|
||||
qbsprojectmanager
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <qtsupport/qtversionmanager.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/sleep.h>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QSettings>
|
||||
@@ -59,14 +60,6 @@
|
||||
#include <QStringListModel>
|
||||
#include <QMessageBox>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <iostream>
|
||||
#include <windows.h>
|
||||
#define sleep(_n) Sleep(1000 * (_n))
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
@@ -618,11 +611,11 @@ QString AndroidConfigurations::waitForAvd(int apiLevel, const QString &cpuAbi) c
|
||||
if (hasFinishedBooting(serialNumber))
|
||||
return serialNumber;
|
||||
else
|
||||
sleep(8);
|
||||
Utils::sleep(8000);
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
sleep(8);
|
||||
Utils::sleep(8000);
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user