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
qqmllocalstorage.cpp File Reference

(4e8bd3111990ee1f4a6bbfe1d1a767520e4c3e11)

#include "qqmllocalstorage_p.h"
#include <QtQml/private/qqmlengine_p.h>
#include <QtQml/private/qv4global_p.h>
#include <QtQml/private/qv4scopedvalue_p.h>
#include <QtQml/private/qv4object_p.h>
#include <QtQml/private/qv4sqlerrors_p.h>
#include <QtQml/private/qv4jscall_p.h>
#include <QtQml/private/qv4objectiterator_p.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qdir.h>
#include <QtSql/qsqldatabase.h>
#include <QtSql/qsqlquery.h>
#include <QtSql/qsqlrecord.h>
#include <QtSql/qsqlerror.h>
#include "moc_qqmllocalstorage_p.cpp"
Include dependency graph for qqmllocalstorage.cpp:

Go to the source code of this file.

Classes

class  QQmlSqlDatabaseData
struct  QV4::Heap::QQmlSqlDatabaseWrapper
class  QV4::QQmlSqlDatabaseWrapper
struct  TransactionRollback

Namespaces

namespace  QV4
namespace  QV4::Heap

Macros

#define V4THROW_SQL(error, desc)
#define V4THROW_SQL2(error, desc)
#define V4THROW_REFERENCE(string)

Functions

 DEFINE_OBJECT_VTABLE (QV4::QQmlSqlDatabaseWrapper)
static ReturnedValue qmlsqldatabase_version (const FunctionObject *b, const Value *thisObject, const QV4::Value *, int)
static ReturnedValue qmlsqldatabase_rows_length (const FunctionObject *b, const Value *thisObject, const QV4::Value *, int)
static ReturnedValue qmlsqldatabase_rows_forwardOnly (const FunctionObject *b, const Value *thisObject, const QV4::Value *, int)
static ReturnedValue qmlsqldatabase_rows_setForwardOnly (const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue qmlsqldatabase_rows_index (const QQmlSqlDatabaseWrapper *r, ExecutionEngine *v4, quint32 index, bool *hasProperty=nullptr)
static ReturnedValue qmlsqldatabase_rows_item (const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static QVariant toSqlVariant (const QV4::ScopedValue &value)
static ReturnedValue qmlsqldatabase_executeSql (const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue qmlsqldatabase_changeVersion (const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue qmlsqldatabase_transaction_shared (const FunctionObject *b, const Value *thisObject, const Value *argv, int argc, bool readOnly)
static ReturnedValue qmlsqldatabase_transaction (const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue qmlsqldatabase_read_transaction (const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)

Macro Definition Documentation

◆ V4THROW_REFERENCE

#define V4THROW_REFERENCE ( string)
Value:
{ \
QV4::ScopedString v(scope, scope.engine->newString(QLatin1String(string))); \
scope.engine->throwReferenceError(v); \
RETURN_UNDEFINED(); \
}
Scoped< String > ScopedString
GLsizei const GLfloat * v

Definition at line 45 of file qqmllocalstorage.cpp.

◆ V4THROW_SQL

#define V4THROW_SQL ( error,
desc )
Value:
{ \
QV4::ScopedString v(scope, scope.engine->newString(desc)); \
QV4::ScopedObject ex(scope, scope.engine->newErrorObject(v)); \
ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))).getPointer(), QV4::ScopedValue(scope, Value::fromInt32(error))); \
scope.engine->throwError(ex); \
RETURN_UNDEFINED(); \
}
Scoped< Object > ScopedObject
DBusConnection const char DBusError * error
#define QStringLiteral(str)
Definition qstring.h:1826
static constexpr Value fromInt32(int i)
Definition qv4value_p.h:190

Definition at line 29 of file qqmllocalstorage.cpp.

◆ V4THROW_SQL2

#define V4THROW_SQL2 ( error,
desc )
Value:
{ \
QV4::ScopedString v(scope, scope.engine->newString(desc)); \
QV4::ScopedObject ex(scope, scope.engine->newErrorObject(v)); \
ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))).getPointer(), QV4::ScopedValue(scope, Value::fromInt32(error))); \
args->setReturnValue(scope.engine->throwError(ex)); \
return; \
}
QJSValueList args

Definition at line 37 of file qqmllocalstorage.cpp.

Function Documentation

◆ DEFINE_OBJECT_VTABLE()

DEFINE_OBJECT_VTABLE ( QV4::QQmlSqlDatabaseWrapper )

◆ qmlsqldatabase_changeVersion()

ReturnedValue qmlsqldatabase_changeVersion ( const FunctionObject * b,
const Value * thisObject,
const Value * argv,
int argc )
static

Definition at line 351 of file qqmllocalstorage.cpp.

References TransactionRollback::clear().

Here is the call graph for this function:

◆ qmlsqldatabase_executeSql()

ReturnedValue qmlsqldatabase_executeSql ( const FunctionObject * b,
const Value * thisObject,
const Value * argv,
int argc )
static

Definition at line 236 of file qqmllocalstorage.cpp.

◆ qmlsqldatabase_read_transaction()

ReturnedValue qmlsqldatabase_read_transaction ( const FunctionObject * f,
const Value * thisObject,
const Value * argv,
int argc )
static

Definition at line 456 of file qqmllocalstorage.cpp.

◆ qmlsqldatabase_rows_forwardOnly()

ReturnedValue qmlsqldatabase_rows_forwardOnly ( const FunctionObject * b,
const Value * thisObject,
const QV4::Value * ,
int  )
static

Definition at line 153 of file qqmllocalstorage.cpp.

◆ qmlsqldatabase_rows_index()

ReturnedValue qmlsqldatabase_rows_index ( const QQmlSqlDatabaseWrapper * r,
ExecutionEngine * v4,
quint32 index,
bool * hasProperty = nullptr )
static

Definition at line 179 of file qqmllocalstorage.cpp.

◆ qmlsqldatabase_rows_item()

ReturnedValue qmlsqldatabase_rows_item ( const FunctionObject * b,
const Value * thisObject,
const Value * argv,
int argc )
static

Definition at line 217 of file qqmllocalstorage.cpp.

◆ qmlsqldatabase_rows_length()

ReturnedValue qmlsqldatabase_rows_length ( const FunctionObject * b,
const Value * thisObject,
const QV4::Value * ,
int  )
static

Definition at line 134 of file qqmllocalstorage.cpp.

◆ qmlsqldatabase_rows_setForwardOnly()

ReturnedValue qmlsqldatabase_rows_setForwardOnly ( const FunctionObject * b,
const Value * thisObject,
const Value * argv,
int argc )
static

Definition at line 162 of file qqmllocalstorage.cpp.

◆ qmlsqldatabase_transaction()

ReturnedValue qmlsqldatabase_transaction ( const FunctionObject * f,
const Value * thisObject,
const Value * argv,
int argc )
static

Definition at line 451 of file qqmllocalstorage.cpp.

◆ qmlsqldatabase_transaction_shared()

ReturnedValue qmlsqldatabase_transaction_shared ( const FunctionObject * b,
const Value * thisObject,
const Value * argv,
int argc,
bool readOnly )
static

Definition at line 414 of file qqmllocalstorage.cpp.

References TransactionRollback::clear().

Here is the call graph for this function:

◆ qmlsqldatabase_version()

ReturnedValue qmlsqldatabase_version ( const FunctionObject * b,
const Value * thisObject,
const QV4::Value * ,
int  )
static

Definition at line 124 of file qqmllocalstorage.cpp.

◆ toSqlVariant()

QVariant toSqlVariant ( const QV4::ScopedValue & value)
static

Definition at line 227 of file qqmllocalstorage.cpp.