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

qmlsc: crash on if + for

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.9, 6.10.0 FF
    • 6.9.0 RC
    • QML: Compiler
    • None
    • 1919410cf (dev), c36416c97 (dev)

    Description

      I had a piece of (bad) code in an application that was accidently missing the .length in the if check

      const theList = PC.Experiment.get() // returns QStringList
      if (theList) {
          for (let entry of theList) {
              console.log(entry)
          }
      } else {
          // do whatever
      }

      which causes a crash of qmlsc. Adding the missing .length makes it happy again - a traditional style for(let i=0;...) loop is also working fine.

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            cajus Cajus Pollmeier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes