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

Example code related to QHash::erase() fails clazy

    XMLWordPrintable

Details

    • macOS
    • 3236b64db (dev), c13f15d08 (6.5), aa6339594 (dev), 37792e75d (tqtc/lts-6.2), b3ba4fe8d (6.5)

    Description

      Example code related to QHash::erase() yields a clazy warning:

       

      Mixing iterators with const_iterators [clazy-strict-iterators]
      Documentation:
      https://github.com/KDE/clazy/blob/1.11/docs/checks/README-strict-iterators.md

       

      I have tested 2 examples:

       

      I haven't tested further examples related to QHash::erase() but it may be the case there too.

      It may also be the case with erase() for other containers.

      Is this an issue with the documentation or should there be a constructor of the following form?

      const_iterator::const_iterator(iterator &other)
      

      Attachments

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

        Activity

          People

            cnn Qt Core & Network
            paulmasri Paul
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: