A delayed result as returned by AsyncModel. More...
#include <Soprano/Util/AsyncResult>
Signals | |
void | resultReady (Soprano::Util::AsyncResult *) |
Public Member Functions | |
~AsyncResult () | |
QVariant | value () const |
Error::ErrorCode | errorCode () const |
StatementIterator | statementIterator () const |
NodeIterator | nodeIterator () const |
QueryResultIterator | queryResultIterator () const |
Node | node () const |
void | setResult (const QVariant &result, const Error::Error &error) |
Static Public Member Functions | |
static AsyncResult * | createResult () |
A delayed result as returned by AsyncModel.
Definition at line 52 of file asyncresult.h.
Soprano::Util::AsyncResult::~AsyncResult | ( | ) |
void Soprano::Util::AsyncResult::resultReady | ( | Soprano::Util::AsyncResult * | ) | [signal] |
Emitted once the async operation is completed and the result can be read.
The result will delete itself.
static AsyncResult* Soprano::Util::AsyncResult::createResult | ( | ) | [static] |
Constructor method to ensure binary compatibility.
QVariant Soprano::Util::AsyncResult::value | ( | ) | const [inline] |
The result of the async operation. Its type is dependent on the operation (for example Error::ErrorCode for AsyncModel::addStatementAsync or StatementIterator for AsyncModel::listStatementsAsync). Types may need to be registered with Q_DECLARE_METATYPE.
Use Error::ErrorCache::lastError() to check for error details.
This value is not ready before resultReady() has been emitted. Do only use this in a slot connected to resultReady.
Definition at line 91 of file asyncresult.h.
Error::ErrorCode Soprano::Util::AsyncResult::errorCode | ( | ) | const |
Convinience method which converts value() into a Error::ErrorCode as returned for the following AsyncModel methods:
StatementIterator Soprano::Util::AsyncResult::statementIterator | ( | ) | const |
Convinience method which converts value() into a StatementIterator as returned AsyncModel::listStatementsAsync.
NodeIterator Soprano::Util::AsyncResult::nodeIterator | ( | ) | const |
Convinience method which converts value() into a StatementIterator as returned AsyncModel::listContextsAsync.
QueryResultIterator Soprano::Util::AsyncResult::queryResultIterator | ( | ) | const |
Convinience method which converts value() into a StatementIterator as returned AsyncModel::executeQueryAsync.
Node Soprano::Util::AsyncResult::node | ( | ) | const |
Convinience method which converts value() into a StatementIterator as returned AsyncModel::createBlankNodeAsync.
void Soprano::Util::AsyncResult::setResult | ( | const QVariant & | result, | |
const Error::Error & | error | |||
) |
Sets the final result and emits the resultReady signal. This method should never be called by clients.