Trim trailing whitespace.
authorStephen Kelly <stephen.kelly@kdab.com>
Tue, 21 Aug 2012 16:19:01 +0000 (18:19 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 22 Aug 2012 07:01:01 +0000 (09:01 +0200)
Change-Id: I3d268d3ce8d73c7287f51abe9a28c165cb75acb9
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
src/qml/qml/qqmlbinding.cpp
src/qml/qml/qqmlpropertycache_p.h
src/qml/qml/v4/qv4bindings.cpp
src/qml/qml/v4/qv4ir.cpp
src/qml/qml/v8/qv8bindings.cpp
src/qml/qml/v8/qv8engine.cpp
tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp
tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp

index f5f0f49..604080b 100644 (file)
@@ -177,7 +177,7 @@ QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContextData *ctxt
     v8function = evalFunction(ctxt, obj, code, QString(), 0);
 }
 
-QQmlBinding::QQmlBinding(const QString &str, bool isRewritten, QObject *obj, 
+QQmlBinding::QQmlBinding(const QString &str, bool isRewritten, QObject *obj,
                          QQmlContextData *ctxt,
                          const QString &url, quint16 lineNumber, quint16 columnNumber)
 : QQmlJavaScriptExpression(&QQmlBinding_jsvtable), QQmlAbstractBinding(Binding),
@@ -200,10 +200,10 @@ QQmlBinding::QQmlBinding(const QString &str, bool isRewritten, QObject *obj,
     v8function = evalFunction(ctxt, obj, code, url, m_lineNumber);
 }
 
-/*!  
-    \internal 
+/*!
+    \internal
 
-    To avoid exposing v8 in the public API, functionPtr must be a pointer to a v8::Handle<v8::Function>.  
+    To avoid exposing v8 in the public API, functionPtr must be a pointer to a v8::Handle<v8::Function>.
     For example:
         v8::Handle<v8::Function> function;
         new QQmlBinding(&function, scope, ctxt);
@@ -275,7 +275,7 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags)
 
         } else {
             QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context()->engine);
-            ep->referenceScarceResources(); 
+            ep->referenceScarceResources();
 
             bool isUndefined = false;
 
@@ -292,7 +292,7 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags)
                                                                     this, result, isUndefined, flags);
 
             if (!watcher.wasDeleted()) {
-               
+
                 if (needsErrorLocationData)
                     delayedError()->setErrorLocation(QUrl(m_url), m_lineNumber, m_columnNumber);
 
@@ -304,7 +304,7 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags)
 
             }
 
-            ep->dereferenceScarceResources(); 
+            ep->dereferenceScarceResources();
         }
 
         if (!watcher.wasDeleted())
@@ -385,7 +385,7 @@ void QQmlBinding::setEnabled(bool e, QQmlPropertyPrivate::WriteFlags flags)
     setEnabledFlag(e);
     setNotifyOnValueChanged(e);
 
-    if (e) 
+    if (e)
         update(flags);
 }
 
index 99c6671..87d15b3 100644 (file)
@@ -396,7 +396,7 @@ public:
 private:
     QBiPointer<QQmlPropertyCache, const QMetaObject> _m;
 };
-  
+
 QQmlPropertyData::QQmlPropertyData()
 {
     propType = 0;
@@ -405,7 +405,7 @@ QQmlPropertyData::QQmlPropertyData()
     overrideIndexIsProperty = false;
     overrideIndex = -1;
     revision = 0;
-    metaObjectOffset = -1; 
+    metaObjectOffset = -1;
     flags = 0;
 }
 
@@ -421,8 +421,8 @@ bool QQmlPropertyData::operator==(const QQmlPropertyRawData &other)
            coreIndex == other.coreIndex &&
            notifyIndex == other.notifyIndex &&
            revision == other.revision &&
-           (!isValueTypeVirtual() || 
-            (valueTypeCoreIndex == other.valueTypeCoreIndex && 
+           (!isValueTypeVirtual() ||
+            (valueTypeCoreIndex == other.valueTypeCoreIndex &&
              valueTypePropType == other.valueTypePropType));
 }
 
index 6dce278..150a11d 100644 (file)
@@ -295,7 +295,7 @@ void Register::copy(const Register &other)
 {
     *this = other;
     if (other.dataType >= FirstCleanupType) {
-        if (other.dataType == QStringType) 
+        if (other.dataType == QStringType)
             copyConstructPointee(getstringptr(), other.getstringptr());
         else if (other.dataType == QUrlType)
             copyConstructPointee(geturlptr(), other.geturlptr());
@@ -307,14 +307,14 @@ void Register::copy(const Register &other)
             copyConstructPointee(gethandleptr(), other.gethandleptr());
         else if (other.dataType == qMetaTypeId<QJSValue>())
             copyConstructPointee(getjsvalueptr(), other.getjsvalueptr());
-    } 
+    }
 }
 
 void Register::init(Type type)
 {
     dataType = type;
     if (dataType >= FirstCleanupType) {
-        if (dataType == QStringType) 
+        if (dataType == QStringType)
             defaultConstructPointee(getstringptr());
         else if (dataType == QUrlType)
             defaultConstructPointee(geturlptr());
@@ -450,7 +450,7 @@ void QV4Bindings::run(Binding *binding, QQmlPropertyPrivate::WriteFlags flags)
         return;
 
     QQmlContextData *context = QQmlAbstractExpression::context();
-    if (!context || !context->isValid()) 
+    if (!context || !context->isValid())
         return;
 
     // Check that the target has not been deleted
@@ -544,14 +544,14 @@ void QV4Bindings::subscribeId(QQmlContextData *p, int idIndex, int subIndex)
         sub->connect(&p->idValues[idIndex].bindings);
     }
 }
+
 void QV4Bindings::subscribe(QObject *o, int notifyIndex, int subIndex, QQmlEngine *e)
 {
     Subscription *sub = (subscriptions + subIndex);
     if (sub->isConnected(o, notifyIndex))
         return;
     sub->bindings = this;
-    sub->method = subIndex; 
+    sub->method = subIndex;
     if (o)
         sub->connect(o, notifyIndex, e);
     else
@@ -652,8 +652,8 @@ static void testBindingResult(const QString &binding, quint16 line, quint16 colu
         return;
     } else if(isUndefined != result.isUndefined()) {
         iserror = true;
-    } 
-    
+    }
+
     QVariant v4value;
     if (!result.isUndefined()) {
         switch (resultType) {
@@ -696,7 +696,7 @@ static void testBindingResult(const QString &binding, quint16 line, quint16 colu
     if (v4Result.isEmpty())
         v4Result = testResultToString(v4value, result.isUndefined());
 
-    if (!testCompareVariants(value, v4value)) 
+    if (!testCompareVariants(value, v4value))
         iserror = true;
 
     if (iserror) {
@@ -724,7 +724,7 @@ static void testBindingException(const QString &binding, quint16 line, quint16 c
     }
 }
 
-static void throwException(int id, QQmlDelayedError *error, 
+static void throwException(int id, QQmlDelayedError *error,
                            QV4Program *program, QQmlContextData *context,
                            const QString &description = QString())
 {
@@ -784,7 +784,7 @@ inline quint32 QV4Bindings::toUint32(double n)
     if (testBinding) testBindingException(*testBindingSource, bindingLine, bindingColumn, context, scope); \
     throwException((id), error, program, context, (str)); \
     goto exceptionExit; \
-} 
+}
 
 #define THROW_VALUE_EXCEPTION_STR(id, str) { \
     throwException((id), error, program, context, (str)); \
@@ -933,7 +933,7 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
     {
         Register &reg = registers[instr->fetchAndSubscribe.reg];
 
-        if (reg.isUndefined()) 
+        if (reg.isUndefined())
             THROW_EXCEPTION(instr->fetchAndSubscribe.exceptionId);
 
         QObject *object = reg.getQObject();
@@ -1014,7 +1014,7 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
     {
         const Register &input = registers[instr->attached.reg];
         Register &output = registers[instr->attached.output];
-        if (input.isUndefined()) 
+        if (input.isUndefined())
             THROW_EXCEPTION(instr->attached.exceptionId);
 
         QObject *object = registers[instr->attached.reg].getQObject();
@@ -1095,7 +1095,7 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
         Register &output = registers[instr->unaryop.output];
         if (src.isUndefined()) {
             output.setUndefined();
-        } else { 
+        } else {
             new (output.getstringptr()) QString(QLatin1String(src.getbool() ? "true" : "false"));
             STRING_REGISTER(instr->unaryop.output);
         }
@@ -1872,21 +1872,21 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
 
     QML_V4_BEGIN_INSTR(BitAndInt, binaryop)
     {
-        registers[instr->binaryop.output].setint(registers[instr->binaryop.left].getint() & 
+        registers[instr->binaryop.output].setint(registers[instr->binaryop.left].getint() &
                                                  registers[instr->binaryop.right].getint());
     }
     QML_V4_END_INSTR(BitAndInt, binaryop)
 
     QML_V4_BEGIN_INSTR(BitOrInt, binaryop)
     {
-        registers[instr->binaryop.output].setint(registers[instr->binaryop.left].getint() | 
+        registers[instr->binaryop.output].setint(registers[instr->binaryop.left].getint() |
                                                  registers[instr->binaryop.right].getint());
     }
     QML_V4_END_INSTR(BitAndInt, binaryop)
 
     QML_V4_BEGIN_INSTR(BitXorInt, binaryop)
     {
-        registers[instr->binaryop.output].setint(registers[instr->binaryop.left].getint() ^ 
+        registers[instr->binaryop.output].setint(registers[instr->binaryop.left].getint() ^
                                                  registers[instr->binaryop.right].getint());
     }
     QML_V4_END_INSTR(BitXorInt, binaryop)
@@ -1904,7 +1904,7 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
         if (instr->binaryop.output == instr->binaryop.left) {
             string += registers[instr->binaryop.right].getstringptr();
         } else {
-            string = *registers[instr->binaryop.left].getstringptr() + 
+            string = *registers[instr->binaryop.left].getstringptr() +
                      *registers[instr->binaryop.right].getstringptr();
         }
     }
@@ -1942,21 +1942,21 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
 
     QML_V4_BEGIN_INSTR(LShiftInt, binaryop)
     {
-        registers[instr->binaryop.output].setint(registers[instr->binaryop.left].getint() << 
+        registers[instr->binaryop.output].setint(registers[instr->binaryop.left].getint() <<
                                                  registers[instr->binaryop.right].getint());
     }
     QML_V4_END_INSTR(LShiftInt, binaryop)
 
     QML_V4_BEGIN_INSTR(RShiftInt, binaryop)
     {
-        registers[instr->binaryop.output].setint(registers[instr->binaryop.left].getint() >> 
+        registers[instr->binaryop.output].setint(registers[instr->binaryop.left].getint() >>
                                                  registers[instr->binaryop.right].getint());
     }
     QML_V4_END_INSTR(RShiftInt, binaryop)
 
     QML_V4_BEGIN_INSTR(URShiftInt, binaryop)
     {
-        registers[instr->binaryop.output].setint((unsigned)registers[instr->binaryop.left].getint() >> 
+        registers[instr->binaryop.output].setint((unsigned)registers[instr->binaryop.left].getint() >>
                                                  registers[instr->binaryop.right].getint());
     }
     QML_V4_END_INSTR(URShiftInt, binaryop)
@@ -2227,7 +2227,7 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
     {
         Register &reg = registers[instr->fetch.reg];
 
-        if (reg.isUndefined()) 
+        if (reg.isUndefined())
             THROW_EXCEPTION(instr->fetch.exceptionId);
 
         QObject *object = reg.getQObject();
@@ -2254,7 +2254,7 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
     QML_V4_BEGIN_INSTR(TestV4Store, storetest)
     {
         Register &data = registers[instr->storetest.reg];
-        testBindingResult(*testBindingSource, bindingLine, bindingColumn, context, 
+        testBindingResult(*testBindingSource, bindingLine, bindingColumn, context,
                           scope, data, instr->storetest.regType);
     }
     QML_V4_END_INSTR(TestV4Store, storetest)
@@ -2263,7 +2263,7 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
     {
         Register &data = registers[instr->store.reg];
 
-        if (data.isUndefined()) 
+        if (data.isUndefined())
             THROW_EXCEPTION_STR(instr->store.exceptionId, QLatin1String("Unable to assign undefined value"));
 
         if (data.gettype() == QObjectStarType) {
@@ -2371,7 +2371,7 @@ exceptionExit:
 
     int reg = 0;
     while (cleanupRegisterMask) {
-        if (cleanupRegisterMask & 0x1) 
+        if (cleanupRegisterMask & 0x1)
             registers[reg].cleanup();
 
         reg++;
index 51f6171..931a377 100644 (file)
@@ -456,20 +456,20 @@ void Function::dump(QTextStream &out)
     out << '}' << endl;
 }
 
-Temp *BasicBlock::TEMP(Type type, int index) 
-{ 
+Temp *BasicBlock::TEMP(Type type, int index)
+{
     Temp *e = function->pool->New<Temp>();
     e->init(type, index);
     return e;
 }
 
-Temp *BasicBlock::TEMP(Type type) 
-{ 
-    return TEMP(type, function->tempCount++); 
+Temp *BasicBlock::TEMP(Type type)
+{
+    return TEMP(type, function->tempCount++);
 }
 
-Expr *BasicBlock::CONST(Type type, double value) 
-{ 
+Expr *BasicBlock::CONST(Type type, double value)
+{
     Const *e = function->pool->New<Const>();
     e->init(type, value);
     return e;
@@ -563,8 +563,8 @@ Name *BasicBlock::MODULE_OBJECT(const QString &id, const QQmlMetaObject &meta, N
     return name;
 }
 
-Expr *BasicBlock::UNOP(AluOp op, Expr *expr) 
-{ 
+Expr *BasicBlock::UNOP(AluOp op, Expr *expr)
+{
     Unop *e = function->pool->New<Unop>();
     e->init(op, expr);
     return e;
@@ -624,29 +624,29 @@ Expr *BasicBlock::BINOP(AluOp op, Expr *left, Expr *right)
 }
 
 Expr *BasicBlock::CALL(Expr *base, ExprList *args)
-{ 
+{
     Call *e = function->pool->New<Call>();
     e->init(base, args);
     return e;
 }
 
-Stmt *BasicBlock::EXP(Expr *expr) 
-{ 
+Stmt *BasicBlock::EXP(Expr *expr)
+{
     Exp *s = function->pool->New<Exp>();
     s->init(expr);
     statements.append(s);
     return s;
 }
 
-Stmt *BasicBlock::MOVE(Expr *target, Expr *source, bool isMoveForReturn) 
-{ 
+Stmt *BasicBlock::MOVE(Expr *target, Expr *source, bool isMoveForReturn)
+{
     Move *s = function->pool->New<Move>();
     s->init(target, source, isMoveForReturn);
     statements.append(s);
     return s;
 }
 
-Stmt *BasicBlock::JUMP(BasicBlock *target) 
+Stmt *BasicBlock::JUMP(BasicBlock *target)
 {
     if (isTerminated())
         return 0;
@@ -657,7 +657,7 @@ Stmt *BasicBlock::JUMP(BasicBlock *target)
     return s;
 }
 
-Stmt *BasicBlock::CJUMP(Expr *cond, BasicBlock *iftrue, BasicBlock *iffalse) 
+Stmt *BasicBlock::CJUMP(Expr *cond, BasicBlock *iftrue, BasicBlock *iffalse)
 {
     if (isTerminated())
         return 0;
@@ -691,7 +691,7 @@ void BasicBlock::dump(QTextStream &out)
 
 #ifdef DEBUG_IR_STRUCTURE
 
-static const char *symbolname(Name::Symbol s) 
+static const char *symbolname(Name::Symbol s)
 {
     switch (s) {
     case Name::Unbound:
@@ -710,7 +710,7 @@ static const char *symbolname(Name::Symbol s)
         return "Slot";
     default:
         Q_ASSERT(!"Unreachable");
-        return "Unknown"; 
+        return "Unknown";
     }
 }
 
@@ -811,7 +811,7 @@ void IRDump::visitString(QQmlJS::IR::String *e)
     qWarning().nospace() << indent() << "String:Expr { type: " << typeName(e->type) << ", value: " << e->value << '}';
 }
 
-static void namedumprecur(QQmlJS::IR::Name *e, const char *indent) 
+static void namedumprecur(QQmlJS::IR::Name *e, const char *indent)
 {
     if (e->base) namedumprecur(e->base, indent);
     qWarning().nospace() << indent << "    { type: " << typeName(e->type) << ", symbol: " << symbolname(e->symbol) << ", storage: " << storagename(e->storage) << ", id: " << e->id << '}';
index 9999ebc..dd57d57 100644 (file)
@@ -162,7 +162,7 @@ void QV8Bindings::Binding::update(QQmlPropertyPrivate::WriteFlags flags)
         bool isUndefined = false;
 
         DeleteWatcher watcher(this);
-        ep->referenceScarceResources(); 
+        ep->referenceScarceResources();
 
         v8::HandleScope handle_scope;
         v8::Context::Scope scope(ep->v8engine()->context());
@@ -193,7 +193,7 @@ void QV8Bindings::Binding::update(QQmlPropertyPrivate::WriteFlags flags)
             setUpdatingFlag(false);
         }
 
-        ep->dereferenceScarceResources(); 
+        ep->dereferenceScarceResources();
 
     } else {
         QQmlProperty p = QQmlPropertyPrivate::restore(*target, instruction->property, context);
index 8233cb7..9f37c2d 100644 (file)
@@ -67,7 +67,7 @@ Q_DECLARE_METATYPE(QJSValue)
 Q_DECLARE_METATYPE(QList<int>)
 
 
-// XXX TODO: Need to check all the global functions will also work in a worker script where the 
+// XXX TODO: Need to check all the global functions will also work in a worker script where the
 // QQmlEngine is not available
 QT_BEGIN_NAMESPACE
 
@@ -99,7 +99,7 @@ static bool ObjectComparisonCallback(v8::Local<v8::Object> lhs, v8::Local<v8::Ob
         case QV8ObjectResource::VariantType:
             // a variant might be equal to a value type or other variant.
             if (rhst == QV8ObjectResource::VariantType) {
-                return lhsr->engine->variantWrapper()->toVariant(lhsr) == 
+                return lhsr->engine->variantWrapper()->toVariant(lhsr) ==
                        lhsr->engine->variantWrapper()->toVariant(rhsr);
             } else if (rhst == QV8ObjectResource::ValueTypeType) {
                 return rhsr->engine->valueTypeWrapper()->isEqual(rhsr, rhsr->engine->variantWrapper()->toVariant(lhsr));
@@ -171,7 +171,7 @@ QV8Engine::QV8Engine(QJSEngine* qq, ContextOwnership ownership)
 QV8Engine::~QV8Engine()
 {
     Q_ASSERT_X(v8::Isolate::GetCurrent(), "QV8Engine::~QV8Engine()", "called after v8::Isolate has exited");
-    for (int ii = 0; ii < m_extensionData.count(); ++ii) 
+    for (int ii = 0; ii < m_extensionData.count(); ++ii)
         delete m_extensionData[ii];
     m_extensionData.clear();
 
@@ -220,7 +220,7 @@ QString QV8Engine::toStringStatic(v8::Handle<v8::String> jsstr)
 
 QVariant QV8Engine::toVariant(v8::Handle<v8::Value> value, int typeHint)
 {
-    if (value.IsEmpty()) 
+    if (value.IsEmpty())
         return QVariant();
 
     if (typeHint == QVariant::Bool)
@@ -320,7 +320,7 @@ static v8::Handle<v8::Object> objectFromVariantMap(QV8Engine *engine, const QVar
 {
     v8::Context::Scope scope(engine->context());
     v8::Local<v8::Object> object = v8::Object::New();
-    for (QVariantMap::ConstIterator iter = map.begin(); iter != map.end(); ++iter) 
+    for (QVariantMap::ConstIterator iter = map.begin(); iter != map.end(); ++iter)
         object->Set(engine->toString(iter.key()), engine->fromVariant(iter.value()));
     return object;
 }
@@ -417,14 +417,14 @@ v8::Handle<v8::Value> QV8Engine::fromVariant(const QVariant &variant)
             // directly against QList<QObject*>?
             const QList<QObject *> &list = *(QList<QObject *>*)ptr;
             v8::Local<v8::Array> array = v8::Array::New(list.count());
-            for (int ii = 0; ii < list.count(); ++ii) 
+            for (int ii = 0; ii < list.count(); ++ii)
                 array->Set(ii, newQObject(list.at(ii)));
             return array;
-        } 
+        }
 
         bool objOk;
         QObject *obj = QQmlMetaType::toQObject(variant, &objOk);
-        if (objOk) 
+        if (objOk)
             return newQObject(obj);
 
         bool succeeded = false;
@@ -453,7 +453,7 @@ v8::Local<v8::Script> QV8Engine::qmlModeCompile(const QString &source,
 
     v8::ScriptOrigin origin(v8fileName, v8::Integer::New(lineNumber - 1));
 
-    v8::Local<v8::Script> script = v8::Script::Compile(v8source, &origin, 0, v8::Handle<v8::String>(), 
+    v8::Local<v8::Script> script = v8::Script::Compile(v8source, &origin, 0, v8::Handle<v8::String>(),
                                                        v8::Script::QmlMode);
 
     return script;
@@ -479,7 +479,7 @@ v8::Local<v8::Script> QV8Engine::qmlModeCompile(const char *source, int sourceLe
     return script;
 }
 
-QNetworkAccessManager *QV8Engine::networkAccessManager() 
+QNetworkAccessManager *QV8Engine::networkAccessManager()
 {
     return QQmlEnginePrivate::get(m_engine)->getNetworkAccessManager();
 }
@@ -681,7 +681,7 @@ void QV8Engine::initializeGlobal(v8::Handle<v8::Object> global)
     v8::Handle<v8::Value> args[] = { global };
     v8::Local<v8::Value> names = m_getOwnPropertyNames->Call(global, 1, args);
     v8::Local<v8::Array> namesArray = v8::Local<v8::Array>::Cast(names);
-    for (quint32 ii = 0; ii < namesArray->Length(); ++ii) 
+    for (quint32 ii = 0; ii < namesArray->Length(); ++ii)
         m_illegalNames.insert(toString(namesArray->Get(ii)), true);
     }
 
@@ -735,7 +735,7 @@ void QV8Engine::registerHandle(void *handle)
         return;
     }
 
-    if (!QV8Engine_activeHandles.hasLocalData()) 
+    if (!QV8Engine_activeHandles.hasLocalData())
         QV8Engine_activeHandles.setLocalData(new QSet<void *>);
 
     if (QV8Engine_activeHandles.localData()->contains(handle)) {
@@ -750,7 +750,7 @@ void QV8Engine::releaseHandle(void *handle)
     if (!handle)
         return;
 
-    if (!QV8Engine_activeHandles.hasLocalData()) 
+    if (!QV8Engine_activeHandles.hasLocalData())
         QV8Engine_activeHandles.setLocalData(new QSet<void *>);
 
     if (QV8Engine_activeHandles.localData()->contains(handle)) {
@@ -782,10 +782,10 @@ int QV8Engine::registerExtension()
 
 void QV8Engine::setExtensionData(int index, Deletable *data)
 {
-    if (m_extensionData.count() <= index) 
+    if (m_extensionData.count() <= index)
         m_extensionData.resize(index + 1);
 
-    if (m_extensionData.at(index)) 
+    if (m_extensionData.at(index))
         delete m_extensionData.at(index);
 
     m_extensionData[index] = data;
index 55f93c6..353e4ee 100644 (file)
@@ -245,7 +245,7 @@ private:
     QCOMPARE(obj->property("test"), value); \
 \
     delete obj; \
-} 
+}
 
 void tst_qqmlcontext::setContextProperty()
 {
@@ -287,56 +287,56 @@ void tst_qqmlcontext::setContextProperty()
 
     // Changes in context properties
     {
-        QQmlComponent component(&engine); 
+        QQmlComponent component(&engine);
         component.setData("import QtQuick 2.0; QtObject { property variant test: a }", QUrl());
 
-        QObject *obj = component.create(&ctxt2); 
+        QObject *obj = component.create(&ctxt2);
 
-        QCOMPARE(obj->property("test"), QVariant(13)); 
+        QCOMPARE(obj->property("test"), QVariant(13));
         ctxt.setContextProperty("a", QVariant(19));
-        QCOMPARE(obj->property("test"), QVariant(19)); 
+        QCOMPARE(obj->property("test"), QVariant(19));
 
-        delete obj; 
+        delete obj;
     }
     {
-        QQmlComponent component(&engine); 
+        QQmlComponent component(&engine);
         component.setData("import QtQuick 2.0; QtObject { property variant test: b }", QUrl());
 
-        QObject *obj = component.create(&ctxt2); 
+        QObject *obj = component.create(&ctxt2);
 
-        QCOMPARE(obj->property("test"), QVariant(8)); 
+        QCOMPARE(obj->property("test"), QVariant(8));
         ctxt.setContextProperty("b", QVariant(5));
-        QCOMPARE(obj->property("test"), QVariant(8)); 
+        QCOMPARE(obj->property("test"), QVariant(8));
         ctxt2.setContextProperty("b", QVariant(1912));
-        QCOMPARE(obj->property("test"), QVariant(1912)); 
+        QCOMPARE(obj->property("test"), QVariant(1912));
 
-        delete obj; 
+        delete obj;
     }
     {
-        QQmlComponent component(&engine); 
+        QQmlComponent component(&engine);
         component.setData("import QtQuick 2.0; QtObject { property variant test: e.a }", QUrl());
 
-        QObject *obj = component.create(&ctxt2); 
+        QObject *obj = component.create(&ctxt2);
 
-        QCOMPARE(obj->property("test"), QVariant(12)); 
+        QCOMPARE(obj->property("test"), QVariant(12));
         obj1.setA(13);
-        QCOMPARE(obj->property("test"), QVariant(13)); 
+        QCOMPARE(obj->property("test"), QVariant(13));
 
-        delete obj; 
+        delete obj;
     }
 
     // New context properties
     {
-        QQmlComponent component(&engine); 
+        QQmlComponent component(&engine);
         component.setData("import QtQuick 2.0; QtObject { property variant test: a }", QUrl());
 
-        QObject *obj = component.create(&ctxt2); 
+        QObject *obj = component.create(&ctxt2);
 
-        QCOMPARE(obj->property("test"), QVariant(19)); 
+        QCOMPARE(obj->property("test"), QVariant(19));
         ctxt2.setContextProperty("a", QVariant(1945));
-        QCOMPARE(obj->property("test"), QVariant(1945)); 
+        QCOMPARE(obj->property("test"), QVariant(1945));
 
-        delete obj; 
+        delete obj;
     }
 
     // Setting an object-variant context property
@@ -389,16 +389,16 @@ void tst_qqmlcontext::setContextObject()
 
     // Changes in context properties
     {
-        QQmlComponent component(&engine); 
+        QQmlComponent component(&engine);
         component.setData("import QtQuick 2.0; QtObject { property variant test: a }", QUrl());
 
-        QObject *obj = component.create(&ctxt); 
+        QObject *obj = component.create(&ctxt);
 
-        QCOMPARE(obj->property("test"), QVariant(12)); 
+        QCOMPARE(obj->property("test"), QVariant(12));
         to.setA(14);
-        QCOMPARE(obj->property("test"), QVariant(14)); 
+        QCOMPARE(obj->property("test"), QVariant(14));
 
-        delete obj; 
+        delete obj;
     }
 }
 
index 658874f..b8e47c8 100644 (file)
@@ -461,8 +461,8 @@ void tst_qqmlproperty::qmlmetaproperty_object()
 
 void tst_qqmlproperty::qmlmetaproperty_object_string()
 {
-    QObject object; 
-    PropertyObject dobject; 
+    QObject object;
+    PropertyObject dobject;
 
     {
         QQmlProperty prop(&object, QString("defaultProperty"));
@@ -765,8 +765,8 @@ void tst_qqmlproperty::qmlmetaproperty_object_context()
 
 void tst_qqmlproperty::qmlmetaproperty_object_string_context()
 {
-    QObject object; 
-    PropertyObject dobject; 
+    QObject object;
+    PropertyObject dobject;
 
     {
         QQmlProperty prop(&object, QString("defaultProperty"), engine.rootContext());
@@ -966,7 +966,7 @@ void tst_qqmlproperty::qmlmetaproperty_object_string_context()
 
 void tst_qqmlproperty::name()
 {
-    { 
+    {
         QQmlProperty p;
         QCOMPARE(p.name(), QString());
     }
@@ -1039,7 +1039,7 @@ void tst_qqmlproperty::name()
 
 void tst_qqmlproperty::read()
 {
-    // Invalid 
+    // Invalid
     {
         QQmlProperty p;
         QCOMPARE(p.read(), QVariant());
@@ -1108,7 +1108,7 @@ void tst_qqmlproperty::read()
         QCOMPARE(p.read(), QVariant());
     }
 
-    // Automatic signal property 
+    // Automatic signal property
     {
         PropertyObject o;
         QQmlProperty p(&o, "onPropertyWithNotifyChanged");