summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichel Renon <michel.renon@free.fr>2015-07-14 23:40:04 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2015-07-27 13:38:07 +0000
commitdcec162ea083b3604ff82c4dc3ca43d2b5054ea7 (patch)
treec4ccd107dbb7d3f392f5abba13d81dd7ccf0589e /bin
parent50fe21c7807afb9650c048e1a82bd97a7fc1d226 (diff)
tdf#92561 : QtCreator doesn't find any generated c++ headers.
Use lib.include to list : - all include paths (with generated c++ headers), - header files for each lib/module. Change-Id: I44f20ddbcaf2ffa844ec02977dea10f32fe9d92f Reviewed-on: https://gerrit.libreoffice.org/17055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gbuild-to-ide23
1 files changed, 13 insertions, 10 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index af1b20a0ce03..82d16344ca82 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -1298,8 +1298,13 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
return os.path.relpath(path, lib.location)
sources_list = []
- headers_list = []
includepath_list = []
+ # The explicit headers list is not mandatory :
+ # QtCreator just needs 'include_path_list' to find all headers files.
+ # But files listed in 'header_list' will be shown
+ # in a specific "Headers" folder in QtCreator's Project panel.
+ # We will list here only headers files of current lib.
+ headers_list = []
for file_ in lib.cxxobjects:
# the file has no extension : search it
# self._log("\n file : %s" % file_)
@@ -1312,21 +1317,19 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
if ext:
headers_list.append(lopath(file_+ext))
- # List all headers
+ # List all include paths
for hdir in lib.include:
- # except from "workdir" folder
- if "workdir" not in hdir:
+ hf_lopath = lopath(hdir)
+ includepath_list.append(hf_lopath)
+
+ # 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)
- # We also need to have a list of include paths
- for header in headers_list:
- header_path = os.path.dirname(header)
- if header_path not in includepath_list:
- includepath_list.append(header_path)
-
# All datas are prepared, store them for the lib.
if lib_folder in self.data_libs:
self.data_libs[lib_folder]['sources'] |= set(sources_list)