RemoteLinux: Lower the timeout when retrieving the environment

Otherwise, a non-responsive device will freeze Qt Creator for ten
seconds (with no announcement, because the env call does not go through
the device shell).

Change-Id: I92ab847dd441494770dbe29cde1c726dd31f32fb
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Christian Kandeler
2024-06-04 14:05:31 +02:00
parent 00174e493f
commit ba017c03c2

View File

@@ -366,7 +366,8 @@ Environment LinuxDevicePrivate::getEnvironment()
Process getEnvProc; Process getEnvProc;
getEnvProc.setCommand(CommandLine{q->filePath("env")}); getEnvProc.setCommand(CommandLine{q->filePath("env")});
getEnvProc.runBlocking(); using namespace std::chrono;
getEnvProc.runBlocking(5s);
const QString remoteOutput = getEnvProc.cleanedStdOut(); const QString remoteOutput = getEnvProc.cleanedStdOut();
m_environmentCache = Environment(remoteOutput.split('\n', Qt::SkipEmptyParts), q->osType()); m_environmentCache = Environment(remoteOutput.split('\n', Qt::SkipEmptyParts), q->osType());