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

I am missing "void QVector::resize(int size, const T& value)"; a resize function that initialize added elements

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.0
    • 4.7.1
    • None

    Description

      QVector has a constructor that takes a default value used to initialize the elements. Why haven't you added a version of QVector::resize with the same capabilities (as we are used to for STL's std::vector)? I find this to be a natural supplement to the existing resize function. Not a big deal, but avoiding the initialization would make my code a bit cleaner.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            stian Stian Andre Olsen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes