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

Deprecate QGenericMatrix<>

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P3: Somewhat important
    • 5.15
    • None
    • Core: Other

    Description

      According to the email discussion, we should deprecate QGenericMatrix<> template class. However, if we deprecate it, we also deprecate all its typedefs, like QMatrix2x2, QMatrix3x3 and so on.

      So issues to be solved:

      1. One of the most used typedefs of QGenericMatrix is QMatrix3x3. That's why the proposition was to add QMatrix3x3 class (as a simple wrapper around float[3][3]). However, we can't add this class to Qt 5.15, since we will still keep the obsoleted QMatrix3x3 wrapper. So, one of the solutions would be to deprecate QGenericMatrix<> and all its typedefs but QMatrix3x3. Later, in Qt 6 we get rid of QGenericMatrix<> and all its typedefs (including QMatrix3x3) and provide QMatrix3x3 wrapper class around float[3][3] with the same API that QGenericMatrix<> has currently. In this way we should keep the source compatibility. Would that work?

      Another option would be to add a 3x3 matrix class in Qt 5.15 under some other name, but I think we don't want that.

      Other options?

      2. Other typedefs, like QMatrix2x2, QMatrix2x3, etc... are used in public Qt API:

      QOpenGLShaderProgram::setUniformValue(int location, const QMatrix2x2& value);
      QOpenGLShaderProgram::setUniformValueArray(int location, const QMatrix3x4 *values, int count);

      ...etc. What to do with them? Just deprecate?

      3. We have some usages of QMatrix2x2, QMatrix2x3 typedefs inside Qt3D module, in:

      qt3d/src/plugins/sceneparsers/gltf/gltfimporter.cpp
      qt3d/src/plugins/sceneparsers/gltf/gltfio.cpp
      qt3d/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp

      What shall we do there?

      Attachments

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

        Activity

          People

            jkobus Jarek Kobus
            jkobus Jarek Kobus
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes