Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71323

Syncqt.pl skips install of some class headers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.13.1, 5.14.0 Alpha
    • 5.11.2, 5.13.0
    • Build System
    • None
    • All
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            SkyCoder Felix Barz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes