Skip to main content

class QCefQuery

Represents the query request sent from the web content(Javascript)

Summary

MembersDescriptions
public QCefQuery()Constructs a query instance.
public ~QCefQuery()Destructs a query instance.
public const QString request() constGets the query content.
public const qint64 id() constGets the query id.
public const QString response() constGets the response content string.
public const bool result() constGets the response result.
public const int error() constGets the response error.
public void setResponseResult(bool success, const QString & response, int error) constSets the response.
public void reply(bool success, const QString & response, int error) constReplies the query.
protected QCefQuery(QCefViewPrivate * source, const QString & req, const int64_t query)Constructs a query instance with request context and query id.
protected void markAsReplied() constMarks the query as replied (for internal use only)
private QSharedPointer< QCefQueryPrivate > d_ptr

Members


public QCefQuery()

Constructs a query instance.


public ~QCefQuery()

Destructs a query instance.


public const QString request() const

Gets the query content.

Returns

The content string


public const qint64 id() const

Gets the query id.

Returns

The query id


public const QString response() const

Gets the response content string.

Returns

The response content string


public const bool result() const

Gets the response result.

Returns

The respone result


public const int error() const

Gets the response error.

Returns

The response error


public void setResponseResult(bool success, const QString & response, int error) const

Sets the response.

Parameters

  • success True if the query is successful; otherwise false

  • response The response content string

  • error The response error


public void reply(bool success, const QString & response, int error) const

Replies the query.

Parameters

  • success The result

  • response The response data

  • error The error code


protected QCefQuery(QCefViewPrivate * source, const QString & req, const int64_t query)

Constructs a query instance with request context and query id.

Parameters

  • source The source CefView

  • req The request context

  • query The query id


protected void markAsReplied() const

Marks the query as replied (for internal use only)


private QSharedPointer< QCefQueryPrivate > d_ptr