diff options
-rw-r--r-- | src/qml/qml/qqmlerror.cpp | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/src/qml/qml/qqmlerror.cpp b/src/qml/qml/qqmlerror.cpp index 0cb82cdbd9..7a1e02eec6 100644 --- a/src/qml/qml/qqmlerror.cpp +++ b/src/qml/qml/qqmlerror.cpp @@ -120,7 +120,8 @@ QQmlError &QQmlError::operator=(const QQmlError &other) delete d; d = 0; } else { - if (!d) d = new QQmlErrorPrivate; + if (!d) + d = new QQmlErrorPrivate; d->url = other.d->url; d->description = other.d->description; d->line = other.d->line; @@ -152,8 +153,9 @@ bool QQmlError::isValid() const */ QUrl QQmlError::url() const { - if (d) return d->url; - else return QUrl(); + if (d) + return d->url; + return QUrl(); } /*! @@ -161,7 +163,8 @@ QUrl QQmlError::url() const */ void QQmlError::setUrl(const QUrl &url) { - if (!d) d = new QQmlErrorPrivate; + if (!d) + d = new QQmlErrorPrivate; d->url = url; } @@ -170,8 +173,9 @@ void QQmlError::setUrl(const QUrl &url) */ QString QQmlError::description() const { - if (d) return d->description; - else return QString(); + if (d) + return d->description; + return QString(); } /*! @@ -179,7 +183,8 @@ QString QQmlError::description() const */ void QQmlError::setDescription(const QString &description) { - if (!d) d = new QQmlErrorPrivate; + if (!d) + d = new QQmlErrorPrivate; d->description = description; } @@ -188,8 +193,9 @@ void QQmlError::setDescription(const QString &description) */ int QQmlError::line() const { - if (d) return qmlSourceCoordinate(d->line); - else return -1; + if (d) + return qmlSourceCoordinate(d->line); + return -1; } /*! @@ -197,7 +203,8 @@ int QQmlError::line() const */ void QQmlError::setLine(int line) { - if (!d) d = new QQmlErrorPrivate; + if (!d) + d = new QQmlErrorPrivate; d->line = qmlSourceCoordinate(line); } @@ -206,8 +213,9 @@ void QQmlError::setLine(int line) */ int QQmlError::column() const { - if (d) return qmlSourceCoordinate(d->column); - else return -1; + if (d) + return qmlSourceCoordinate(d->column); + return -1; } /*! @@ -215,7 +223,8 @@ int QQmlError::column() const */ void QQmlError::setColumn(int column) { - if (!d) d = new QQmlErrorPrivate; + if (!d) + d = new QQmlErrorPrivate; d->column = qmlSourceCoordinate(column); } @@ -227,8 +236,9 @@ void QQmlError::setColumn(int column) */ QObject *QQmlError::object() const { - if (d) return d->object; - else return 0; + if (d) + return d->object; + return 0; } /*! @@ -236,7 +246,8 @@ QObject *QQmlError::object() const */ void QQmlError::setObject(QObject *object) { - if (!d) d = new QQmlErrorPrivate; + if (!d) + d = new QQmlErrorPrivate; d->object = object; } @@ -247,8 +258,9 @@ void QQmlError::setObject(QObject *object) */ QtMsgType QQmlError::messageType() const { - if (d) return d->messageType; - else return QtMsgType::QtWarningMsg; + if (d) + return d->messageType; + return QtMsgType::QtWarningMsg; } /*! @@ -259,7 +271,8 @@ QtMsgType QQmlError::messageType() const */ void QQmlError::setMessageType(QtMsgType messageType) { - if (!d) d = new QQmlErrorPrivate; + if (!d) + d = new QQmlErrorPrivate; d->messageType = messageType; } |