4#include <QtCore/qrect.h>
6#include <emscripten/val.h>
9#error This is a wasm-only file.
23QRectF QRectF::fromDOMRect(emscripten::val domRect)
26 "Passed object is not a DOMRect");
28 return QRectF(domRect[
"left"].as<qreal>(), domRect[
"top"].as<qreal>(),
29 domRect[
"width"].as<qreal>(), domRect[
"height"].as<qreal>());
40emscripten::val QRectF::toDOMRect()
const
54QString QString::fromJsString(emscripten::val jsString)
58 const double length = jsString[
"length"].as<
double>();
61 &&
double(uint64_t(
length)) !=
double(uint64_t(
length) + 1))
62 || !std::numeric_limits<double>::is_iec559,
63 Q_FUNC_INFO,
"The floating-point length cannot precisely represent an integer");
65 constexpr int zeroTerminatorLength = 1;
66 const auto lengthOfUtf16 = (
length + zeroTerminatorLength) * 2;
68 Q_ASSERT_X((
double(uint64_t(lengthOfUtf16)) !=
double(uint64_t(lengthOfUtf16) - 1)
69 &&
double(uint64_t(lengthOfUtf16)) !=
double(uint64_t(lengthOfUtf16) + 1))
70 || !std::numeric_limits<double>::is_iec559,
72 "The floating-point lengthOfUtf16 cannot precisely represent an integer");
76 static const emscripten::val stringToUTF16(emscripten::val::module_property(
"stringToUTF16"));
78 emscripten::val(lengthOfUtf16));
91emscripten::val QString::toJsString()
const
93 static const emscripten::val UTF16ToString(emscripten::val::module_property(
"UTF16ToString"));
\inmodule QtCore\reentrant
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr QRectF() noexcept
Constructs a null rectangle.
constexpr qreal left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr qreal top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
\macro QT_RESTRICTED_CAST_FROM_ASCII
const ushort * utf16() const
Returns the QString as a '\0\'-terminated array of unsigned shorts.
Combined button and popup list for selecting options.
constexpr Initialization Uninitialized
GLenum GLuint GLenum GLsizei length
#define Q_ASSERT_X(cond, x, msg)