diff --git a/ChangeLog b/ChangeLog index 8c496a3e..cf9ef39f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ NEW IN WAF 1.7.11 * Redundant check_dir call causing random uninstall failures #1313 * Append to moc flags instead of replacing them #1317 * Share moc tasks in the Qt processing #1318 +* Fixed a source of unnecessary rebuilds in the Qt processing NEW IN WAF 1.7.10 ----------------- diff --git a/waflib/Tools/qt4.py b/waflib/Tools/qt4.py index f8ebcc98..195532ca 100644 --- a/waflib/Tools/qt4.py +++ b/waflib/Tools/qt4.py @@ -115,14 +115,21 @@ class qxx(Task.classes['cxx']): self.moc_done = 0 def scan(self): - """Re-use the C/C++ scanner, but remove the moc files from the dependencies""" + """ + Re-use the C/C++ scanner, but remove the moc files from the dependencies + since the .cpp file already depends on all the headers + """ (nodes, names) = c_preproc.scan(self) - # for some reasons (variants) the moc node may end in the list of node deps + lst = [] for x in nodes: + # short lists, no need to use sets if x.name.endswith('.moc'): - nodes.remove(x) - names.append(x.path_from(self.inputs[0].parent.get_bld())) - return (nodes, names) + s = x.path_from(self.inputs[0].parent.get_bld()) + if s not in names: + names.append(s) + else: + lst.append(x) + return (lst, names) def runnable_status(self): """