Changed: One second timeout to get version, see #279

--HG--
branch : develop
This commit is contained in:
kervala 2016-09-22 18:09:43 +02:00
parent 8b2d787c77
commit d6b0f49db2

View file

@ -260,8 +260,10 @@ QString getVersionFromExecutable(const QString &path)
QByteArray data;
// read all output
while (process.waitForReadyRead()) data.append(process.readAll());
while (process.waitForReadyRead(1000)) data.append(process.readAll());
if (!data.isEmpty())
{
QString versionString = QString::fromUtf8(data);
// parse version from output (client)
@ -271,6 +273,7 @@ QString getVersionFromExecutable(const QString &path)
// parse version from output (other tools)
reg.setPattern("([A-Za-z_ ]+) ([0-9.]+)");
if (reg.indexIn(versionString) > -1) return reg.cap(2);
}
#ifdef Q_OS_WIN
// try to parse version of executable in resources