Properly handle include cycles
authorKevin Ottens <kevin.ottens.qnx@kdab.com>
Wed, 1 Aug 2012 13:38:03 +0000 (15:38 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 8 Aug 2012 09:14:39 +0000 (11:14 +0200)
commit3b99677b3376924e347ec4aeb0c363438146bfde
tree47b673c3b392558998cccef5b6a4c26b33ef86a9
parent9de71796c1e13a241f540da7c38134227cef1d73
Properly handle include cycles

Currently lupdate is just issuing a warning when it detects an
include cycle. Since it's not a full preprocessor, most of those
warnings are false positives, but they need special handling, this
patch provides that.

Now every result is stored as part of a cycle (so in the general
case a cycle of one file). When detecting a cycle, instead instead
of issuing a warning, we record the presence of the newly detected
cycle for later use and merge the other relevant cycles with it.
When retrieving results now it's not for a single file anymore but
for a complete cycle at once (which can turn out to be a cycle of
one file).

Task-number: QTBUG-6587

Change-Id: Ia12bc680e645b9704a3178e8a843a554a60811bf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
src/linguist/lupdate/cpp.cpp