forked from qt-creator/qt-creator
Maemo: Move MADDE environment information out of MaemoToolChain class.
The toolchain is not available in all places where we need the respective information, which resulted in duplicated code.
This commit is contained in:
@@ -92,19 +92,14 @@ MaemoQemuRuntimeParser::MaemoQemuRuntimeParser(const QString &madInfoOutput,
|
||||
MaemoQemuRuntime MaemoQemuRuntimeParser::parseRuntime(const QtVersion *qtVersion)
|
||||
{
|
||||
MaemoQemuRuntime runtime;
|
||||
const QString maddeRootPath
|
||||
= MaemoGlobal::maddeRoot(qtVersion->qmakeCommand());
|
||||
const QString madCommand = maddeRootPath + QLatin1String("/bin/mad");
|
||||
if (!QFileInfo(madCommand).exists())
|
||||
return runtime;
|
||||
const QString maddeRootPath = MaemoGlobal::maddeRoot(qtVersion);
|
||||
QProcess madProc;
|
||||
MaemoGlobal::callMaddeShellScript(madProc, maddeRootPath, madCommand,
|
||||
QStringList() << QLatin1String("info"));
|
||||
if (!MaemoGlobal::callMad(madProc, QStringList() << QLatin1String("info"), qtVersion))
|
||||
return runtime;
|
||||
if (!madProc.waitForStarted() || !madProc.waitForFinished())
|
||||
return runtime;
|
||||
const QByteArray &madInfoOutput = madProc.readAllStandardOutput();
|
||||
const QString &targetName
|
||||
= MaemoGlobal::targetName(qtVersion->qmakeCommand());
|
||||
const QString &targetName = MaemoGlobal::targetName(qtVersion);
|
||||
runtime = MaemoQemuRuntimeParserV2(madInfoOutput, targetName, maddeRootPath)
|
||||
.parseRuntime();
|
||||
if (!runtime.m_name.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user