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

Add support for usage of placement new together with data model indexes

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.11.2
    • Core: Item Models
    • None
    • All

    Description

      Two member functions "QAbstractItemModel::createIndex" are described in a terse way. The created model index provides functionality which is similar to a pointer. The technical difference is that a model index is usually viewed as a coordinate which has got the attributes "row" and "column".

      Such an index makes an existing object accessible within a data model. Some programmers would prefer to work with pointers (or C++ references) for specific data structures instead.

      One C++ programming interface which provides a pointer based on selected input parameters is known as "placement new". How do you think about to use this technique for a direct mapping from position information to a concrete object at more source code places?

      I tried to clarify the software situation another bit by the discussion topic "Increasing usage for C++ new operators based on data model indexes?" before.

      Attachments

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

        Activity

          People

            dfaure_kdab David Faure
            elfring Markus Elfring
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes