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

Qt.atob() and Qt.btoa() are broken

    XMLWordPrintable

Details

    Description

      Qt.btoa() should take a binary QByteArray as input and convert it to a Base64 QString, yet the code shows that it takes a QString as input:

      http://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/qml/qml/v8/qqmlbuiltinfunctions.cpp?id=4a886753a75c7c4d66f1fa9cab5a6c5a03240df3#n992

      Qt.atob() takes a Base64 string as input, converts it to binary, but stores it in a QString using QString::fromUtf8():

      The auto tests test this incorrect behaviour by e.g. storing the binary data as a string:

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mitch_curtis Mitch Curtis
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes