forked from qt-creator/qt-creator
Process: Get rid of setTimeoutS()
Add an extra arg to runBlocking() function instead. Use std::chrono::seconds for timeout. Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -220,9 +220,8 @@ static bool is32BitUserSpace()
|
||||
if (HostOsInfo::isLinuxHost()) {
|
||||
if (QSysInfo::WordSize == 32) {
|
||||
Process proc;
|
||||
proc.setTimeoutS(3);
|
||||
proc.setCommand({"getconf", {"LONG_BIT"}});
|
||||
proc.runBlocking();
|
||||
proc.runBlocking(std::chrono::seconds(3));
|
||||
if (proc.result() != ProcessResult::FinishedWithSuccess)
|
||||
return true;
|
||||
return proc.allOutput().trimmed() == "32";
|
||||
@@ -312,7 +311,6 @@ bool AndroidAvdManager::isAvdBooted(const QString &device) const
|
||||
const CommandLine command({m_config.adbToolPath(), arguments});
|
||||
qCDebug(avdManagerLog).noquote() << "Running command (isAvdBooted):" << command.toUserOutput();
|
||||
Process adbProc;
|
||||
adbProc.setTimeoutS(10);
|
||||
adbProc.setCommand(command);
|
||||
adbProc.runBlocking();
|
||||
if (adbProc.result() != ProcessResult::FinishedWithSuccess)
|
||||
|
||||
Reference in New Issue
Block a user