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

Make QStringList constructor more user friendly

XMLWordPrintable

      Creating a new QStringList by passing 2 string literals to it "works"

      QStringList("abc", "def"); 

      and is fairly easy to mistake with

      QStringList{"abc", "def"} 

      but the result is completely different with the former being unsafe due to QList(InputIterator first, InputIterator last) being called.

      Suggestion:

      Create a constructor that allows the user to pass a variable number of strings as arguments to create a new QStringList.

       

        1. sample.cpp
          1 kB
          Miika Pernu
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            miikapernu Miika Pernu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes