forked from qt-creator/qt-creator
RVCT: Speed up detection of version
Speed up detection of version information of RVCT. This is especially relevant for people with wrong license server information as that causes creator to wait for a timeout! Reviewed-by: dt
This commit is contained in:
@@ -114,7 +114,7 @@ RvctToolChain::RvctVersion RvctToolChain::version(const QString &rvctPath)
|
|||||||
|
|
||||||
QProcess armcc;
|
QProcess armcc;
|
||||||
const QString binary = rvctPath;
|
const QString binary = rvctPath;
|
||||||
armcc.start(binary, QStringList());
|
armcc.start(binary, QStringList() << "--version_number");
|
||||||
if (!armcc.waitForStarted()) {
|
if (!armcc.waitForStarted()) {
|
||||||
qWarning("Unable to run rvct binary '%s' when trying to determine version.", qPrintable(binary));
|
qWarning("Unable to run rvct binary '%s' when trying to determine version.", qPrintable(binary));
|
||||||
return v;
|
return v;
|
||||||
@@ -131,7 +131,7 @@ RvctToolChain::RvctVersion RvctToolChain::version(const QString &rvctPath)
|
|||||||
}
|
}
|
||||||
QString versionLine = QString::fromLocal8Bit(armcc.readAllStandardOutput());
|
QString versionLine = QString::fromLocal8Bit(armcc.readAllStandardOutput());
|
||||||
versionLine += QString::fromLocal8Bit(armcc.readAllStandardError());
|
versionLine += QString::fromLocal8Bit(armcc.readAllStandardError());
|
||||||
const QRegExp versionRegExp(QLatin1String("RVCT(\\d*)\\.(\\d*).*\\[Build.(\\d*)\\]"),
|
const QRegExp versionRegExp(QLatin1String("^(\\d)(\\d)0*([1-9]\\d*)"),
|
||||||
Qt::CaseInsensitive);
|
Qt::CaseInsensitive);
|
||||||
Q_ASSERT(versionRegExp.isValid());
|
Q_ASSERT(versionRegExp.isValid());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user