Skip to content
  • Jan-Arve Saether's avatar
    Fix a bug in qdocs handling of excludedirs · 526da72e
    Jan-Arve Saether authored
    
    
    The bug was there because the way qdoc tries to exclude the directories
    given in the "excludedirs" variable:
    It did a simple string comparision on the candidate path (to include)
    with every string in the "excludedirs" variable.
    
    However, this did not work for all cases, since the paths are not
    canonicalized.
    For instance, the problem I faced was that the following qdocconf
    fragment: (config file located in doc/qtwidgets.qdocconf)
    sourcedirs  += ..
    excludedirs += snippets
    
    Since qdoc would recursively parse all subfolders of sourcedirs, it
    would at one point visit the snippets folder, but it would have the
    relative path "../doc/snippets", which did not match with "snippets",
    causing snippets to not be excluded.
    
    In addition, it seems that qdoc tries hard not to use absolute paths
    (maybe because of more human-friendly error messages). I therefore
    chose to canonicalize the relative paths.
    
    As a side-effect this also give a better output from qdoc, as
    ../doc/foo.qdoc:42: Missing link
    will become
    foo.qdoc:42: Missing link
    
    Change-Id: If9c25fa569abd03542bd12675acd44d8f4e0282c
    Reviewed-by: default avatarMartin Smith <martin.smith@nokia.com>
    526da72e