Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qohosjsutils.h File Reference

(d936ea765098ab8f9041e14142b2f1269ca842fd)

#include <QtCore/private/qcore_ohos_p.h>
#include <QtCore/private/qnapi_p.h>
#include <QtCore/private/qohoscommon_p.h>
#include <QtCore/private/qohosjstools_p.h>
#include <QtCore/qglobal.h>
#include <chrono>
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <qohosutils.h>
#include <string>
#include <type_traits>
#include "qohoscloseeventcontext_p.h"
Include dependency graph for qohosjsutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  QtOhos

Functions

template<typename T>
QNapi::Promise QtOhos::adaptAsyncCallResultToJsPromise (QOhosJsState &jsState, std::function< QNapi::Value(QOhosJsState &, T)> promiseValueFactory, const QOhosConsumer< QOhosJsState &, QOhosConsumer< QOhosJsState &, T > > &asyncCallFunc)
Q_REQUIRED_RESULT std::shared_ptr< void > QtOhos::startDelayedJsThreadTask (QOhosJsState &jsState, std::function< void(QOhosJsState &)> task, std::chrono::milliseconds delay)
int QtOhos::setJsTimeout (QOhosJsState &jsState, std::function< void(const QOhosCallbackInfo &)> timeoutFunc, std::chrono::milliseconds delay)
void QtOhos::clearJsTimeout (QOhosJsState &jsState, int timerId)
QNapi::Promise QtOhos::makeResolvedPromise (QNapi::Value valueForResolve)
QNapi::Promise QtOhos::makeResolvedPromise (Napi::Env env)
template<typename T>
std::optional< T > QtOhos::getOptionalProperty (const QNapi::Object &object, const std::string &propName)
std::optional< std::uint32_t > QtOhos::tryGetCodeFromJsBusinessError (const Napi::Error &error)
void QtOhos::rethrowUnlessJsBusinessErrorIs (const Napi::Error &error, std::uint32_t suppressedErrorCode, const char *callerContextName)
bool QtOhos::runIgnoringJsBusinessError (QOhosJsState &, std::uint32_t suppressedErrorCode, const char *callerContextName, const std::function< void()> &action)
template<typename ConfigValue>
QOhosSupplier< ConfigValue > QtOhos::makeOhosConfigValueDataSource (std::function< ConfigValue(QOhosJsState &)> initValueSupplier, std::function< ConfigValue(QOhosJsState &, const QNapi::Object &)> valueFetcher, QOhosConsumer< ConfigValue > valueChangedHandler)