18#include <private/qglobal_p.h>
19#include <QtCore/qglobal.h>
20#include "QtCore/qhash.h"
21#include "QtCore/qiodevice.h"
22#include "QtCore/private/qwasmsuspendresumecontrol_p.h"
24#include <emscripten/val.h>
28#include <initializer_list>
34#include <emscripten/proxying.h>
35#include <emscripten/threading.h>
38#if QT_CONFIG(wasm_jspi)
39# define QT_WASM_EMSCRIPTEN_ASYNC ,emscripten::async()
41# define QT_WASM_EMSCRIPTEN_ASYNC
244 template<
typename...
Args>
250 qFatal(
"This function did not return a promise");
259 qFatal(
"This function did not return a promise");
312 template<
typename...
Args>
321 qFatal(
"This function did not return a promise");
327 template<
typename...
Args>
338 qFatal(
"This function did not return a promise");
351 return wrappedCallback;
375 bool open(QIODevice::OpenMode mode)
override;
378 bool seek(qint64 pos)
override;
430 static emscripten::val savedWindow = emscripten::val::global(
"window");
qint64 size() const override
For open random-access devices, this function returns the size of the device.
bool seek(qint64 pos) override
For random-access devices, this function sets the current position to pos, returning true on success,...
Uint8ArrayIODevice(Uint8Array array)
bool isSequential() const override
Returns true if this device is sequential; otherwise returns false.
qint64 writeData(const char *data, qint64 size) override
Writes up to maxSize bytes from data to the device.
bool open(QIODevice::OpenMode mode) override
qint64 readData(char *data, qint64 maxSize) override
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an...
bool canBlockCallingThread()
const char makeContextfulPromiseFunctionName[]
static void usePotentialyUnusedSymbols()
decltype(auto) bindForever(F wrappedCallback)
std::function< void(emscripten::val)> thenFunc
std::function< void()> finallyFunc
std::function< void(emscripten::val)> catchFunc