Rename QBA::{to,from}Uint8Array() → {to,from}EcmaUint8Array()
Found in API review: from/toUintArray() is too generic a name, make sure its name gives enough context. Pick-to: 6.5 Change-Id: Ie10ff06ae11a5e168c4c91b60a9698a41d0429fc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
81ce878f55
commit
7db28fb4bd
@ -464,12 +464,12 @@ QByteArray decoded = encoded.percentDecoded(); // Set to "Qt is great!"
|
|||||||
|
|
||||||
//! [55]
|
//! [55]
|
||||||
emscripten::val uint8array = emscripten::val::global("g_uint8array");
|
emscripten::val uint8array = emscripten::val::global("g_uint8array");
|
||||||
QByteArray byteArray = QByteArray::fromUint8Array(uint8array);
|
QByteArray byteArray = QByteArray::fromEcmaUint8Array(uint8array);
|
||||||
//! [55]
|
//! [55]
|
||||||
|
|
||||||
//! [56]
|
//! [56]
|
||||||
QByteArray byteArray = "test";
|
QByteArray byteArray = "test";
|
||||||
emscripten::val uint8array = QByteArray::toUint8Array(byteArray);
|
emscripten::val uint8array = QByteArray::toEcmaUint8Array(byteArray);
|
||||||
//! [56]
|
//! [56]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4865,10 +4865,10 @@ QByteArray QByteArray::toPercentEncoding(const QByteArray &exclude, const QByteA
|
|||||||
\since 6.5
|
\since 6.5
|
||||||
\ingroup platform-type-conversions
|
\ingroup platform-type-conversions
|
||||||
|
|
||||||
\sa toUint8Array()
|
\sa toEcmaUint8Array()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QByteArray QByteArray::fromUint8Array(emscripten::val uint8array)
|
QByteArray QByteArray::fromEcmaUint8Array(emscripten::val uint8array)
|
||||||
{
|
{
|
||||||
return qstdweb::Uint8Array(uint8array).copyToQByteArray();
|
return qstdweb::Uint8Array(uint8array).copyToQByteArray();
|
||||||
}
|
}
|
||||||
@ -4888,9 +4888,9 @@ QByteArray QByteArray::fromUint8Array(emscripten::val uint8array)
|
|||||||
\since 6.5
|
\since 6.5
|
||||||
\ingroup platform-type-conversions
|
\ingroup platform-type-conversions
|
||||||
|
|
||||||
\sa toUint8Array()
|
\sa toEcmaUint8Array()
|
||||||
*/
|
*/
|
||||||
emscripten::val QByteArray::toUint8Array()
|
emscripten::val QByteArray::toEcmaUint8Array()
|
||||||
{
|
{
|
||||||
return qstdweb::Uint8Array::copyFrom(*this).val();
|
return qstdweb::Uint8Array::copyFrom(*this).val();
|
||||||
}
|
}
|
||||||
|
@ -394,8 +394,8 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WASM) || defined(Q_QDOC)
|
#if defined(Q_OS_WASM) || defined(Q_QDOC)
|
||||||
static QByteArray fromUint8Array(emscripten::val uint8array);
|
static QByteArray fromEcmaUint8Array(emscripten::val uint8array);
|
||||||
emscripten::val toUint8Array();
|
emscripten::val toEcmaUint8Array();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef char *iterator;
|
typedef char *iterator;
|
||||||
|
@ -106,7 +106,7 @@ void QWasmFontDatabase::populateFamily(const QString &familyName)
|
|||||||
.thenFunc = [](val status) {
|
.thenFunc = [](val status) {
|
||||||
qCDebug(lcQpaFonts) << "onArrayBuffer" ;
|
qCDebug(lcQpaFonts) << "onArrayBuffer" ;
|
||||||
|
|
||||||
QByteArray fontByteArray = QByteArray::fromUint8Array(status);
|
QByteArray fontByteArray = QByteArray::fromEcmaUint8Array(status);
|
||||||
|
|
||||||
QFreeTypeFontDatabase::addTTFile(fontByteArray, QByteArray());
|
QFreeTypeFontDatabase::addTTFile(fontByteArray, QByteArray());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user