diff options
authorMichael Weghorn <>2019-07-15 13:01:15 +0200
committerMichael Weghorn <>2019-11-04 08:07:32 +0100
commit290fbab60366fccc5302bf1ded6cee8eb5b9cfe6 (patch)
parent13e8a6f5b247c17413a812eb07b482c04f9f4945 (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: Tested-by: Jenkins Reviewed-by: Michael Weghorn <> (cherry picked from commit de44936e61dbd0a0b1d397717f58319f7c0075d5)
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():