forked from qt-creator/qt-creator
Docker: Raise number of iterations when starting container
On Windows this call takes way longer to write to the cidfile. Beside this, read only from file if it could be opened to silence some Qt internal warnings. Change-Id: Iec5f631aaf871995c1903289d7a0a24abc2f8e05 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -596,15 +596,16 @@ void DockerDevicePrivate::tryCreateLocalFileAccess()
|
||||
}
|
||||
|
||||
LOG("CHECKING: " << tempFileName);
|
||||
for (int i = 0; i <= 10; ++i) {
|
||||
for (int i = 0; i <= 20; ++i) {
|
||||
QFile file(tempFileName);
|
||||
file.open(QIODevice::ReadOnly);
|
||||
m_container = QString::fromUtf8(file.readAll()).trimmed();
|
||||
if (!m_container.isEmpty()) {
|
||||
LOG("Container: " << m_container);
|
||||
break;
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
m_container = QString::fromUtf8(file.readAll()).trimmed();
|
||||
if (!m_container.isEmpty()) {
|
||||
LOG("Container: " << m_container);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == 10) {
|
||||
if (i == 20) {
|
||||
qWarning("Docker cid file empty.");
|
||||
return; // No
|
||||
}
|
||||
|
Reference in New Issue
Block a user