Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.0.0
-
None
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:
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:
- http://code.qt.io/cgit/qt/qtdeclarative.git/tree/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp?id=4a886753a75c7c4d66f1fa9cab5a6c5a03240df3#n937
- http://code.qt.io/cgit/qt/qtdeclarative.git/tree/tests/auto/qml/qqmlqt/data/atob.qml?id=4a886753a75c7c4d66f1fa9cab5a6c5a03240df3
- http://code.qt.io/cgit/qt/qtdeclarative.git/tree/tests/auto/qml/qqmlqt/data/btoa.qml?id=4a886753a75c7c4d66f1fa9cab5a6c5a03240df3