diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2019-07-15 13:01:15 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2019-11-04 08:07:32 +0100 |
commit | 290fbab60366fccc5302bf1ded6cee8eb5b9cfe6 (patch) | |
tree | 325364cde8a0062628fafcf70d4d69c00e2192d3 | |
parent | 13e8a6f5b247c17413a812eb07b482c04f9f4945 (diff) |
qtcreator: Recursively include module's header files
Recursivley walk the include directories located
inside the current module's directory, since includes
are basically paths relative to the include directories
and can refer to files in subdirectories of the include
path, like e.g.
#include <extended/AccessibleBrowseBoxBase.hxx>
in 'accessibility/source/extended/AccessibleBrowseBoxBase.cxx'.
This way, such header files are added to the .pro files
and are thus e.g. shown in Qt Creator's project view
and can be found by using 'a <FILEANME>' in the Locator.
Change-Id: Id74f971b2ffee82203f74a4d444c41166c671920
Reviewed-on: https://gerrit.libreoffice.org/75628
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit de44936e61dbd0a0b1d397717f58319f7c0075d5)
-rwxr-xr-x | bin/gbuild-to-ide | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index 6e1717b37c80..2da77d86db7f 100755 --- a/bin/gbuild-to-ide +++ b/bin/gbuild-to-ide @@ -1513,10 +1513,11 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator): # List headers files from current lib for hdir in lib.include: if hdir.startswith(lib.location): - for hf in os.listdir(hdir): - if hf.endswith(('.h', '.hxx', '.hpp', '.hrc')): - hf_lopath = lopath(os.path.join(hdir, hf)) - headers_list.append(hf_lopath) + for dirpath, _, files in os.walk(hdir): + for hf in files: + if hf.endswith(('.h', '.hxx', '.hpp', '.hrc')): + hf_lopath = lopath(os.path.join(dirpath, hf)) + headers_list.append(hf_lopath) # List defines for key, value in lib.defs.items(): |