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

assignToHTMLImageElement no longer exists in Qt5

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.0.1
    • Fix Version/s: 5.1.0
    • Component/s: WebKit
    • Labels:
      None
    • Commits:
      cef77ac6846fa60b3baa5731164c5efca651becb

      Description

      QWebKit allows developers to export QImage objects to Javascript and use Javascript to assign the QImage to an <img/> element.
      This is documented in http://qt-project.org/doc/qt-5.0/qtwebkit/qtwebkit-bridge.html

      The problem is that the documentation no longer matches reality. The (Javascript) function was indeed called assignToHTMLImageElement in Qt 4.8, but in Qt5 it's simply 'assignTo'.

      The responsible code can be found in qtwebkit/Source/WebCore/bridge/qt/qt_pixmapruntime.cpp (QtPixmapRuntime::getClassRef()).

      I feel very strongly that there was no good reason to change the function name so rather than updating the documentation to reflect the code the code should simply be changed back to expose the old name, or to allow both. It should be trivial to allow both assignTo and assignToHTMLImageElement to be used.

        Attachments

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

          Activity

            People

            Assignee:
            jturcott Jocelyn Turcotte
            Reporter:
            kristof.provost Kristof Provost
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes