Use exact and aysnc .pro file evaluate

This is a big change touching almost all of our .pro file parsing.
With this patch we only evaluate once exact for all needs and once
greedy for the filelist. That is the qt runconfigurations don't have own
evaluaters but reuse the project wide exact evaluation.

We reevaluate if the user changes the build directory, the qmake
buildconfiguration or the qmake arguments. That is if you open src.pro
(or projects.pro) of qt with a shadow build you still don't get all the
files, but after correcting the build directory, we reevaluate the .pro
files and find all files. So for a suitable definition of fixed, that
bug is now fixed.

We now get the exact defines of all .pro files instead of all defines for all
buildconfigurations. We still don't distinguish in which
.pro file a DEFINE is set. So the code model now knows about all the
defines set for the given configuration but not for which files it is
actually set. Also that includes all DEFINES set in .qmake.cache or the
mkspecs. This means all defines from .pro files should now work.

The intial loading is still synchronous. I haven't looked into it to
deeply, but it seems possible to make it also async.There are probably a
few issues which need to be solved fist.

Also due to the asynchronous nature of the code, the executable is
updated a few seconds after actually changing the build configuration
This commit is contained in:
dt
2010-03-10 16:55:37 +01:00
parent 309163cef8
commit ab8fc52d0b
23 changed files with 875 additions and 699 deletions

View File

@@ -1221,6 +1221,7 @@ void QtVersion::updateToolChainAndMkspec() const
ProFileOption option;
option.properties = versionInfo();
option.cache = ProFileCacheManager::instance()->cache();
ProFileCacheManager::instance()->incRefCount();
ProFileReader *reader = new ProFileReader(&option);
reader->setCumulative(false);
reader->setParsePreAndPostFiles(false);
@@ -1302,6 +1303,7 @@ void QtVersion::updateToolChainAndMkspec() const
}
delete reader;
ProFileCacheManager::instance()->decRefCount();
m_toolChainUpToDate = true;
}