make ProFileOption persist during the scan of an entire project

there is no point in throwing away and re-recreating invariant data over
and over ...

shaves off ~15% of the load time of Qt 4.6.
This commit is contained in:
Oswald Buddenhagen
2009-12-07 20:49:39 +01:00
parent 0682dae77c
commit ef660880ad
11 changed files with 67 additions and 62 deletions

View File

@@ -571,8 +571,7 @@ void MaemoRunConfiguration::updateTarget()
return;
}
QtVersion *qtVersion = qt4bc->qtVersion();
ProFileReader *reader = proFileNode->createProFileReader();
ProFileReader *reader = qt4Project->createProFileReader(proFileNode);
reader->setCumulative(false);
// Find out what flags we pass on to qmake
@@ -582,7 +581,7 @@ void MaemoRunConfiguration::updateTarget()
reader->setConfigCommandLineArguments(addedUserConfigArguments, removedUserConfigArguments);
if (!reader->readProFile(m_proFilePath)) {
delete reader;
qt4Project->destroyProFileReader(reader);
Core::ICore::instance()->messageManager()->printToOutputPane(tr(
"Could not parse %1. The Maemo run configuration %2 "
"can not be started.").arg(m_proFilePath).arg(name()));
@@ -620,7 +619,7 @@ void MaemoRunConfiguration::updateTarget()
target = QFileInfo(m_proFilePath).baseName();
m_executable = QDir::cleanPath(baseDir + QLatin1Char('/') + target);
delete reader;
qt4Project->destroyProFileReader(reader);
}
emit targetInformationChanged();