Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qv4globalobject.cpp File Reference
#include "qv4globalobject_p.h"
#include <private/qv4alloca_p.h>
#include <private/qv4codegen_p.h>
#include <private/qv4context_p.h>
#include <private/qv4function_p.h>
#include <private/qv4mm_p.h>
#include <private/qv4scopedvalue_p.h>
#include <private/qv4script_p.h>
#include <private/qv4stackframe_p.h>
#include <private/qv4string_p.h>
#include <private/qv4value_p.h>
#include <wtf/MathExtras.h>
#include <QtCore/private/qlocale_tools_p.h>
#include <QtCore/private/qtools_p.h>
#include <QtCore/qdebug.h>
#include <QtCore/qstring.h>
#include <iostream>
+ Include dependency graph for qv4globalobject.cpp:

Go to the source code of this file.

Enumerations

enum  DecodeMode { DecodeAll , DecodeNonReserved }
 

Functions

static QString escape (const QString &input)
 
static QString unescape (const QString &input)
 
static void addEscapeSequence (QString &output, uchar ch)
 
static QString encode (const QString &input, const char *unescapedSet, bool *ok)
 
static QString decode (const QString &input, DecodeMode decodeMode, bool *ok)
 
 DEFINE_OBJECT_VTABLE (EvalFunction)
 
static int toInt (const QChar &qc, int R)
 

Variables

static const char uriReserved [] = ";/?:@&=+$,#"
 
static const char uriUnescaped [] = "-_.!~*'()"
 
static const char uriUnescapedReserved [] = "-_.!~*'();/?:@&=+$,#"
 

Enumeration Type Documentation

◆ DecodeMode

enum DecodeMode
Enumerator
DecodeAll 
DecodeNonReserved 

Definition at line 181 of file qv4globalobject.cpp.

Function Documentation

◆ addEscapeSequence()

static void addEscapeSequence ( QString output,
uchar  ch 
)
static

Definition at line 105 of file qv4globalobject.cpp.

References ch, and output.

Referenced by encode().

+ Here is the caller graph for this function:

◆ decode()

static QString decode ( const QString input,
DecodeMode  decodeMode,
bool *  ok 
)
static

Definition at line 186 of file qv4globalobject.cpp.

References ch, d1, DecodeNonReserved, error, i, j, QStringView::mid(), ok, output, and uriReserved.

+ Here is the call graph for this function:

◆ DEFINE_OBJECT_VTABLE()

DEFINE_OBJECT_VTABLE ( EvalFunction  )

◆ encode()

static QString encode ( const QString input,
const char *  unescapedSet,
bool *  ok 
)
static

Definition at line 112 of file qv4globalobject.cpp.

References addEscapeSequence(), escape(), i, ok, output, and QChar::requiresSurrogates().

+ Here is the call graph for this function:

◆ escape()

static QString escape ( const QString input)
static

Definition at line 31 of file qv4globalobject.cpp.

References i, and output.

Referenced by encode(), QRegularExpression::escape(), findArgEscapes(), getEscape(), QV4::GlobalFunctions::method_escape(), and replaceArgEscapes().

+ Here is the caller graph for this function:

◆ toInt()

static int toInt ( const QChar qc,
int  R 
)
inlinestatic

◆ unescape()

static QString unescape ( const QString input)
static

Definition at line 63 of file qv4globalobject.cpp.

References d1, d2, and i.

Referenced by QV4::GlobalFunctions::method_unescape().

+ Here is the caller graph for this function:

Variable Documentation

◆ uriReserved

const char uriReserved[] = ";/?:@&=+$,#"
static

Definition at line 101 of file qv4globalobject.cpp.

Referenced by decode().

◆ uriUnescaped

const char uriUnescaped[] = "-_.!~*'()"
static

◆ uriUnescapedReserved

const char uriUnescapedReserved[] = "-_.!~*'();/?:@&=+$,#"
static

Definition at line 103 of file qv4globalobject.cpp.

Referenced by QV4::GlobalFunctions::method_encodeURI().