From ef177c41a614094c85fa89373c7e9075cac0da18 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Tue, 3 May 2011 14:46:43 +0200 Subject: [PATCH] Removed some trailing whitespace (cherry picked from commit 713a4c2fc2a52277a9b820608e3270507850ac47) --- src/declarative/qml/qdeclarativeengine.cpp | 34 +++++++++++++++--------------- src/declarative/qml/qdeclarativeengine_p.h | 10 ++++----- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index fb3e136..8c8e7a2 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -124,7 +124,7 @@ QT_BEGIN_NAMESPACE \brief The QtObject element is the most basic element in QML. The QtObject element is a non-visual element which contains only the - objectName property. + objectName property. It can be useful to create a QtObject if you need an extremely lightweight element to enclose a set of custom properties: @@ -139,7 +139,7 @@ QT_BEGIN_NAMESPACE This property holds the QObject::objectName for this specific object instance. This allows a C++ application to locate an item within a QML component - using the QObject::findChild() method. For example, the following C++ + using the QObject::findChild() method. For example, the following C++ application locates the child \l Rectangle item and dynamically changes its \c color value: @@ -153,7 +153,7 @@ QT_BEGIN_NAMESPACE Rectangle { anchors.fill: parent - color: "red" + color: "red" objectName: "myRect" } } @@ -167,7 +167,7 @@ QT_BEGIN_NAMESPACE view.show(); QDeclarativeItem *item = view.rootObject()->findChild("myRect"); - if (item) + if (item) item->setProperty("color", QColor(Qt::yellow)); \endcode */ @@ -203,7 +203,7 @@ void QDeclarativeEnginePrivate::defineModule() \keyword QmlGlobalQtObject -\brief The \c Qt object provides useful enums and functions from Qt, for use in all QML files. +\brief The \c Qt object provides useful enums and functions from Qt, for use in all QML files. The \c Qt object is a global object with utility functions, properties and enums. @@ -761,7 +761,7 @@ QNetworkAccessManager *QDeclarativeEngine::networkAccessManager() const /*! Sets the \a provider to use for images requested via the \e - image: url scheme, with host \a providerId. The QDeclarativeEngine + image: url scheme, with host \a providerId. The QDeclarativeEngine takes ownership of \a provider. Image providers enable support for pixmap and threaded image @@ -1070,7 +1070,7 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre rv = pf(const_cast(object)); - if (rv) + if (rv) data->attachedProperties()->insert(id, rv); return rv; @@ -1262,7 +1262,7 @@ Returns a \l Component object created using the QML file at the specified \a url or \c null if an empty string was given. The returned component's \l Component::status property indicates whether the -component was successfully created. If the status is \c Component.Error, +component was successfully created. If the status is \c Component.Error, see \l Component::errorString() for an error description. Call \l {Component::createObject()}{Component.createObject()} on the returned @@ -1622,7 +1622,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr return engine->newVariant(QVariant::fromValue(date.toString(format))); } else if (formatArg.isNumber()) { enumFormat = Qt::DateFormat(formatArg.toUInt32()); - } else { + } else { return ctxt->throwError(QLatin1String("Qt.formatDateTime(): Invalid datetime format")); } } @@ -1687,7 +1687,7 @@ QScriptValue QDeclarativeEnginePrivate::hsla(QScriptContext *ctxt, QScriptEngine } /*! -\qmlmethod rect Qt::rect(int x, int y, int width, int height) +\qmlmethod rect Qt::rect(int x, int y, int width, int height) Returns a \c rect with the top-left corner at \c x, \c y and the specified \c width and \c height. @@ -1859,7 +1859,7 @@ Binary to ASCII - this function returns a base64 encoding of \c data. */ QScriptValue QDeclarativeEnginePrivate::btoa(QScriptContext *ctxt, QScriptEngine *) { - if (ctxt->argumentCount() != 1) + if (ctxt->argumentCount() != 1) return ctxt->throwError(QLatin1String("Qt.btoa(): Invalid arguments")); QByteArray data = ctxt->argument(0).toString().toUtf8(); @@ -1874,7 +1874,7 @@ ASCII to binary - this function returns a base64 decoding of \c data. QScriptValue QDeclarativeEnginePrivate::atob(QScriptContext *ctxt, QScriptEngine *) { - if (ctxt->argumentCount() != 1) + if (ctxt->argumentCount() != 1) return ctxt->throwError(QLatin1String("Qt.atob(): Invalid arguments")); QByteArray data = ctxt->argument(0).toString().toUtf8(); @@ -2293,7 +2293,7 @@ QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(const QMetaObj } } -QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeType *type, int minorVersion, +QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeType *type, int minorVersion, QDeclarativeError &error) { QList types; @@ -2302,7 +2302,7 @@ QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeTy const QMetaObject *metaObject = type->metaObject(); while (metaObject) { - QDeclarativeType *t = QDeclarativeMetaType::qmlType(metaObject, type->module(), + QDeclarativeType *t = QDeclarativeMetaType::qmlType(metaObject, type->module(), type->majorVersion(), minorVersion); if (t) { maxMinorVersion = qMax(maxMinorVersion, t->minorVersion()); @@ -2346,7 +2346,7 @@ QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeTy // Signals override: // * other signals and methods of the same name. - // * properties named on + // * properties named on // * automatic Changed notify signals // Methods override: @@ -2371,7 +2371,7 @@ QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeTy QDeclarativePropertyCache::Data *current = d; while (!overloadError && current) { current = d->overrideData(current); - if (current && raw->isAllowedInRevision(current)) + if (current && raw->isAllowedInRevision(current)) overloadError = true; } } @@ -2379,7 +2379,7 @@ QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeTy if (overloadError) { if (hasCopied) raw->release(); - + error.setDescription(QLatin1String("Type ") + QString::fromUtf8(type->qmlTypeName()) + QLatin1String(" ") + QString::number(type->majorVersion()) + QLatin1String(".") + QString::number(minorVersion) + QLatin1String(" contains an illegal property \"") + overloadName + QLatin1String("\". This is an error in the type's implementation.")); return 0; } diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h index 1777c88..fd851f7 100644 --- a/src/declarative/qml/qdeclarativeengine_p.h +++ b/src/declarative/qml/qdeclarativeengine_p.h @@ -331,14 +331,14 @@ public: /*! Returns a QDeclarativePropertyCache for \a obj if one is available. -If \a obj is null, being deleted or contains a dynamic meta object 0 +If \a obj is null, being deleted or contains a dynamic meta object 0 is returned. The returned cache is not referenced, so if it is to be stored, call addref(). */ -QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(QObject *obj) +QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(QObject *obj) { - if (!obj || QObjectPrivate::get(obj)->metaObject || QObjectPrivate::get(obj)->wasDeleted) + if (!obj || QObjectPrivate::get(obj)->metaObject || QObjectPrivate::get(obj)->wasDeleted) return 0; const QMetaObject *mo = obj->metaObject(); @@ -348,10 +348,10 @@ QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(QObject *obj) } /*! -Returns a QDeclarativePropertyCache for \a metaObject. +Returns a QDeclarativePropertyCache for \a metaObject. As the cache is persisted for the life of the engine, \a metaObject must be -a static "compile time" meta-object, or a meta-object that is otherwise known to +a static "compile time" meta-object, or a meta-object that is otherwise known to exist for the lifetime of the QDeclarativeEngine. The returned cache is not referenced, so if it is to be stored, call addref(). -- 2.7.4