Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.2, 5.13.0
-
None
-
-
36a15a87de2b954b1cef24acd4a8cd4ef5aef6cd (qt/qtbase/5.13)
Description
Under some conditions, syncqt.pl skips the install rule generation of some headers. I was able to find the reason and exact conditions.
This only happens in case one header is the postfix of another header, for example MyClass and AnotherMyClass. For that example, both class-headers are correctly generated, but only AnotherMyClass gets added to the headers.pri file and thus only for that one install rules are generated.
The reason are these lines in syncqt.pl (Currently Line 1093) :
my $class_header = "$class "; $pri_install_gfiles .= $class_header unless ($shadow || $pri_install_gfiles =~ $class_header);
The problem is that the regular expression "$class " will also match AnotherMyClass, even if $class equals MyClass. (AnotherMyClass is always evaluated first, because the class list gets sorted alphabetically)
Luckily the solution is rather simple: use "(?:^|\s)$class " as the regular expression. This will make shure only full strings are matched and fix this problem.