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

inconsistent return types for initializeOpenGLFunctions()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • 6.0
    • 5.2.0 Alpha
    • GUI: OpenGL
    • None

    Description

      The return types of initializeOpenGLFunctions() appear to be inconsistent accross various QtGui classes:

      void QOpenGLFunctions::initializeOpenGLFunctions(void),
      bool QOpenGLFunctions_x_y_*::initializeOpenGLFunctions(void)
      void QOpenGLTexturePrivate::initializeOpenGLFunctions(void)

      This makes it impossible to share code that checks the return code of initializeOpenGLFunctions() – required for explicitly 'named' profiles – with the default core profile. This is because checking for the return code is not possible for the default QOpenGLFunctions class as compile time errors are triggered ("could not convert void to bool for ...").

      The attached patch against 5.2.0-alpha proposes to have consistent bool return type for all occurrences of initializeOpenGLFunctions() and just return 'true' where appropriate.

      Attachments

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

        Activity

          People

            seanharmer Sean Harmer
            seeger Steffen Seeger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes