Changeset 57334 in webkit
- Timestamp:
- Apr 9, 2010 6:03:43 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r57333 r57334 1 2010-04-09 Tasuku Suzuki <tasuku.suzuki@nokia.com> 2 3 Reviewed by Simon Hausmann. 4 5 [Qt]Fix compile error with QT_NO_PROPERTIES 6 https://bugs.webkit.org/show_bug.cgi?id=36526 7 8 Disable dynamic properties when QT_NO_PROPERTIES is defined. 9 10 * bridge/qt/qt_class.cpp: 11 (JSC::Bindings::QtClass::fieldNamed): 12 * bridge/qt/qt_instance.cpp: 13 (JSC::Bindings::QtInstance::getPropertyNames): 14 (JSC::Bindings::QtField::name): 15 (JSC::Bindings::QtField::valueFromInstance): 16 (JSC::Bindings::QtField::setValueToInstance): 17 * bridge/qt/qt_runtime.h: 18 (JSC::Bindings::QtField::): 19 1 20 2010-04-09 David Leong <david.leong@nokia.com> 2 21 -
trunk/WebCore/bridge/qt/qt_class.cpp
r55837 r57334 140 140 if (f->fieldType() == QtField::MetaProperty) 141 141 return f; 142 #ifndef QT_NO_PROPERTIES 142 143 else if (f->fieldType() == QtField::DynamicProperty) { 143 144 if (obj->dynamicPropertyNames().indexOf(ba) >= 0) … … 148 149 delete f; 149 150 } 150 } else { 151 } 152 #endif 153 else { 151 154 QList<QObject*> children = obj->children(); 152 155 for (int index = 0; index < children.count(); ++index) { … … 173 176 } 174 177 178 #ifndef QT_NO_PROPERTIES 175 179 // Dynamic properties 176 180 index = obj->dynamicPropertyNames().indexOf(ba); … … 180 184 return f; 181 185 } 186 #endif 182 187 183 188 // Child objects … … 203 208 return 0; 204 209 210 #ifndef QT_NO_PROPERTIES 205 211 // deleted qobject, but can't throw an error from here (no exec) 206 212 // create a fake QtField that will throw upon access … … 209 215 qtinst->m_fields.insert(objName, f); 210 216 } 217 #endif 211 218 return f; 212 219 } -
trunk/WebCore/bridge/qt/qt_instance.cpp
r55312 r57334 221 221 } 222 222 223 #ifndef QT_NO_PROPERTIES 223 224 QList<QByteArray> dynProps = obj->dynamicPropertyNames(); 224 225 foreach(QByteArray ba, dynProps) { 225 226 array.add(Identifier(exec, ba.constData())); 226 227 } 228 #endif 227 229 228 230 for (i=0; i < meta->methodCount(); i++) { … … 326 328 else if (m_type == ChildObject && m_childObject) 327 329 return m_childObject->objectName().toLatin1(); 330 #ifndef QT_NO_PROPERTIES 328 331 else if (m_type == DynamicProperty) 329 332 return m_dynamicProperty.constData(); 333 #endif 330 334 return ""; // deleted child object 331 335 } … … 345 349 } else if (m_type == ChildObject) 346 350 val = QVariant::fromValue((QObject*) m_childObject); 351 #ifndef QT_NO_PROPERTIES 347 352 else if (m_type == DynamicProperty) 348 353 val = obj->property(m_dynamicProperty); 349 354 #endif 350 355 return convertQVariantToValue(exec, inst->rootObject(), val); 351 356 } else { … … 372 377 if (m_property.isWritable()) 373 378 m_property.write(obj, val); 374 } else if (m_type == DynamicProperty) 379 } 380 #ifndef QT_NO_PROPERTIES 381 else if (m_type == DynamicProperty) 375 382 obj->setProperty(m_dynamicProperty.constData(), val); 383 #endif 376 384 } else { 377 385 QString msg = QString(QLatin1String("cannot access member `%1' of deleted QObject")).arg(QLatin1String(name())); -
trunk/WebCore/bridge/qt/qt_runtime.h
r55404 r57334 41 41 typedef enum { 42 42 MetaProperty, 43 #ifndef QT_NO_PROPERTIES 43 44 DynamicProperty, 45 #endif 44 46 ChildObject 45 47 } QtFieldType; … … 49 51 {} 50 52 53 #ifndef QT_NO_PROPERTIES 51 54 QtField(const QByteArray &b) 52 55 : m_type(DynamicProperty), m_dynamicProperty(b) 53 56 {} 57 #endif 54 58 55 59 QtField(QObject *child)
Note: See TracChangeset
for help on using the changeset viewer.