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

qmlformat: 'From' properties confuses IndentingLineWriter

    XMLWordPrintable

Details

    • All
    • 5598bd165 (dev), 33d26c033 (6.9), babb415c4 (6.8)

    Description

       This will confuse the IndentingLineWriter because 'from' is recognized as keyword, while being used as the name of properties of the quick controls.

      A {
          b: Slider {
              from: c
          }
          d {}
      } 

       
      Our only solution was to disable the recognition of the 'from' keyword because we used the property but we don't use the 'from' syntax for imports.
      qqmljskeywords_p.h

        //this interferes with properties named 'from'
        // else if (s[0].unicode() == 'f') {
        //   if (s[1].unicode() == 'r') {
        //     if (s[2].unicode() == 'o') {
        //       if (s[3].unicode() == 'm') {
        //         return int(Lexer::T_FROM);
        //       }
        //     }
        //   }
        // } 

      Attachments

        For Gerrit Dashboard: QTBUG-132065
        # Subject Branch Project Status CR V

        Activity

          People

            olivier.decanniere Olivier De Cannière
            ovidiu.tepescu Ovidiu Tepescu
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes