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

Sign mismatches in QML language server

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.9.0 FF
    • 6.9
    • Qt Language Server
    • None
    • Windows
    • 4baa3b7c5 (dev), b14891e3d (dev)

    Description

      The QML language server causes compiler warnings due to multiple comparisons of signed and unsigned integer variables.

      One example in qqmllsutils.cpp:294

       const auto smallestColon = smallest->fileLocation->info().regions[ColonTokenRegion];
      // sanity check: is it the definition of the current binding? check if they both have their
      // ':' at the same location
      if (propertyDefinitionColon.isValid() && propertyDefinitionColon == smallestColon
          && offsetInFile < smallestColon.offset) {
          return smallestPropertyDefinition;
      }
      

      offsetInFile is a qsizetype, while smallesColon.offset is a qint32.

      Side note: The definition of smallestColon using auto is inappropriate, because the type is not obvious at this point.

      Attachments

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

        Activity

          People

            sami.shalayel Sami Shalayel
            axelspoerl Axel Spoerl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes