summaryrefslogtreecommitdiffstats
path: root/WebCore/bridge/qt/qt_class.cpp
diff options
context:
space:
mode:
authorLeon Clarke <leonclarke@google.com>2010-06-03 14:33:32 +0100
committerLeon Clarke <leonclarke@google.com>2010-06-08 12:24:51 +0100
commit5af96e2c7b73ebc627c6894727826a7576d31758 (patch)
treef9d5e6f6175ccd7e3d14de9b290f08937a0d17ba /WebCore/bridge/qt/qt_class.cpp
parent8cc4fcf4f6adcbc0e0aebfc24fbad9a4cddf2cfb (diff)
downloadexternal_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.zip
external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.gz
external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.bz2
Merge webkit.org at r60469 : Initial merge by git.
Change-Id: I66a0047aa2af802f66bb0c7f2a8b02247a596234
Diffstat (limited to 'WebCore/bridge/qt/qt_class.cpp')
-rw-r--r--WebCore/bridge/qt/qt_class.cpp47
1 files changed, 22 insertions, 25 deletions
diff --git a/WebCore/bridge/qt/qt_class.cpp b/WebCore/bridge/qt/qt_class.cpp
index 2357c23..d809c81 100644
--- a/WebCore/bridge/qt/qt_class.cpp
+++ b/WebCore/bridge/qt/qt_class.cpp
@@ -18,14 +18,14 @@
*/
#include "config.h"
-#include "Identifier.h"
-
#include "qt_class.h"
+
+#include "Identifier.h"
#include "qt_instance.h"
#include "qt_runtime.h"
-#include <qmetaobject.h>
#include <qdebug.h>
+#include <qmetaobject.h>
namespace JSC {
namespace Bindings {
@@ -144,21 +144,19 @@ Field* QtClass::fieldNamed(const Identifier& identifier, Instance* instance) con
if (f->fieldType() == QtField::MetaProperty)
return f;
#ifndef QT_NO_PROPERTIES
- else if (f->fieldType() == QtField::DynamicProperty) {
+ if (f->fieldType() == QtField::DynamicProperty) {
if (obj->dynamicPropertyNames().indexOf(ascii) >= 0)
return f;
- else {
- // Dynamic property that disappeared
- qtinst->m_fields.remove(name);
- delete f;
- }
+ // Dynamic property that disappeared
+ qtinst->m_fields.remove(name);
+ delete f;
}
#endif
else {
const QList<QObject*>& children = obj->children();
const int count = children.size();
for (int index = 0; index < count; ++index) {
- QObject *child = children.at(index);
+ QObject* child = children.at(index);
if (child->objectName() == name)
return f;
}
@@ -195,7 +193,7 @@ Field* QtClass::fieldNamed(const Identifier& identifier, Instance* instance) con
const QList<QObject*>& children = obj->children();
const int count = children.count();
for (index = 0; index < count; ++index) {
- QObject *child = children.at(index);
+ QObject* child = children.at(index);
if (child->objectName() == name) {
f = new QtField(child);
qtinst->m_fields.insert(name, f);
@@ -205,23 +203,22 @@ Field* QtClass::fieldNamed(const Identifier& identifier, Instance* instance) con
// Nothing named this
return 0;
- } else {
- // For compatibility with qtscript, cached methods don't cause
- // errors until they are accessed, so don't blindly create an error
- // here.
- if (qtinst->m_methods.contains(ascii))
- return 0;
+ }
+ // For compatibility with qtscript, cached methods don't cause
+ // errors until they are accessed, so don't blindly create an error
+ // here.
+ if (qtinst->m_methods.contains(ascii))
+ return 0;
#ifndef QT_NO_PROPERTIES
- // deleted qobject, but can't throw an error from here (no exec)
- // create a fake QtField that will throw upon access
- if (!f) {
- f = new QtField(ascii);
- qtinst->m_fields.insert(name, f);
- }
-#endif
- return f;
+ // deleted qobject, but can't throw an error from here (no exec)
+ // create a fake QtField that will throw upon access
+ if (!f) {
+ f = new QtField(ascii);
+ qtinst->m_fields.insert(name, f);
}
+#endif
+ return f;
}
}