diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-05 02:46:41 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-05 02:46:41 (GMT) |
commit | f7573945387671cafaff14924905859e296b47f7 (patch) | |
tree | 47123591a09e94fc58b5c6d74c3a4d7004563487 | |
parent | 84b619c1e8556c3e7ca79d799dfa705b63523370 (diff) | |
download | Qt-f7573945387671cafaff14924905859e296b47f7.zip Qt-f7573945387671cafaff14924905859e296b47f7.tar.gz Qt-f7573945387671cafaff14924905859e296b47f7.tar.bz2 |
QmlError doc
-rw-r--r-- | src/declarative/qml/qmlcomponent.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/qmlerror.cpp | 47 |
2 files changed, 51 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 3b4d7b3..66440f5 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -351,6 +351,10 @@ void QmlComponent::loadUrl(const QUrl &url) emit statusChanged(status()); } +/*! + Return the list of errors that occured during the last compile or create + operation. An empty list is returned if isError() is not set. +*/ QList<QmlError> QmlComponent::errors() const { Q_D(const QmlComponent); diff --git a/src/declarative/qml/qmlerror.cpp b/src/declarative/qml/qmlerror.cpp index 66c834f..2ed3500 100644 --- a/src/declarative/qml/qmlerror.cpp +++ b/src/declarative/qml/qmlerror.cpp @@ -46,6 +46,10 @@ QT_BEGIN_NAMESPACE +/*! + \class QmlError + \brief The QmlError class encapsulates a QML error +*/ class QmlErrorPrivate { public: @@ -62,17 +66,26 @@ QmlErrorPrivate::QmlErrorPrivate() { } +/*! + Create an empty error object. +*/ QmlError::QmlError() : d(new QmlErrorPrivate) { } +/*! + Create a copy of \a other. +*/ QmlError::QmlError(const QmlError &other) : d(new QmlErrorPrivate) { *this = other; } +/*! + Assign \a other to this error object. +*/ QmlError &QmlError::operator=(const QmlError &other) { d->url = other.d->url; @@ -82,51 +95,85 @@ QmlError &QmlError::operator=(const QmlError &other) return *this; } +/*! + \internal +*/ QmlError::~QmlError() { delete d; d = 0; } +/*! + Return the url for the file that caused this error. +*/ QUrl QmlError::url() const { return d->url; } +/*! + Set the \a url for the file that caused this error. +*/ void QmlError::setUrl(const QUrl &url) { d->url = url; } +/*! + Return the error description. +*/ QString QmlError::description() const { return d->description; } +/*! + Set the error \a description. +*/ void QmlError::setDescription(const QString &description) { d->description = description; } +/*! + Return the error line number. +*/ int QmlError::line() const { return d->line; } +/*! + Set the error \a line number. +*/ void QmlError::setLine(int line) { d->line = line; } +/*! + Return the error column number. +*/ int QmlError::column() const { return d->column; } +/*! + Set the error \a column number. +*/ void QmlError::setColumn(int column) { d->column = column; } +/*! + \relates QmlError + \fn QDebug operator<<(QDebug debug, const QmlError &error) + + Output a human readable version of \a error to \a debug. +*/ + QDebug operator<<(QDebug debug, const QmlError &error) { QUrl url = error.url(); |