src/corelib/kernel/qmetaobject.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   572 #ifndef QT_NO_DEBUG
   572 #ifndef QT_NO_DEBUG
   573     const QMetaObject *m = *baseObject;
   573     const QMetaObject *m = *baseObject;
   574     if (i >= 0 && m && m->d.superdata) {
   574     if (i >= 0 && m && m->d.superdata) {
   575         int conflict = m->d.superdata->indexOfMethod(signal);
   575         int conflict = m->d.superdata->indexOfMethod(signal);
   576         if (conflict >= 0)
   576         if (conflict >= 0)
   577             qWarning("QMetaObject::indexOfSignal:%s: Conflict with %s::%s",
   577             qWarning("QMetaObject::indexOfSignal: signal %s from %s redefined in %s",
   578                      m->d.stringdata, m->d.superdata->d.stringdata, signal);
   578                      signal, m->d.superdata->d.stringdata, m->d.stringdata);
   579     }
   579     }
   580 #endif
   580 #endif
   581     return i;
   581     return i;
   582 }
   582 }
   583 
   583 
  2235     // this feature is currently only used by QtDBus and should not be depended
  2235     // this feature is currently only used by QtDBus and should not be depended
  2236     // upon. Don't change it without looking into QDBusAbstractInterface first
  2236     // upon. Don't change it without looking into QDBusAbstractInterface first
  2237     // -1 (unchanged): normal qt_metacall, result stored in argv[0]
  2237     // -1 (unchanged): normal qt_metacall, result stored in argv[0]
  2238     // changed: result stored directly in value, return the value of status
  2238     // changed: result stored directly in value, return the value of status
  2239     int status = -1;
  2239     int status = -1;
  2240     void *argv[] = { 0, &v, &status };
  2240     // the flags variable is used by the declarative module to implement
       
  2241     // interception of property writes.
       
  2242     int flags = 0;
       
  2243     void *argv[] = { 0, &v, &status, &flags };
  2241     if (t == QVariant::LastType)
  2244     if (t == QVariant::LastType)
  2242         argv[0] = &v;
  2245         argv[0] = &v;
  2243     else
  2246     else
  2244         argv[0] = v.data();
  2247         argv[0] = v.data();
  2245     QMetaObject::metacall(object, QMetaObject::WriteProperty, idx + mobj->propertyOffset(), argv);
  2248     QMetaObject::metacall(object, QMetaObject::WriteProperty, idx + mobj->propertyOffset(), argv);
  2643 
  2646 
  2644     Example: if the index of "destroyed()" is passed, the index of "destroyed(QObject*)" is returned
  2647     Example: if the index of "destroyed()" is passed, the index of "destroyed(QObject*)" is returned
  2645  */
  2648  */
  2646 int QMetaObjectPrivate::originalClone(const QMetaObject *mobj, int local_method_index)
  2649 int QMetaObjectPrivate::originalClone(const QMetaObject *mobj, int local_method_index)
  2647 {
  2650 {
       
  2651     Q_ASSERT(local_method_index < get(mobj)->methodCount);
  2648     int handle = get(mobj)->methodData + 5 * local_method_index;
  2652     int handle = get(mobj)->methodData + 5 * local_method_index;
  2649     while (mobj->d.data[handle + 4] & MethodCloned) {
  2653     while (mobj->d.data[handle + 4] & MethodCloned) {
  2650         Q_ASSERT(local_method_index > 0);
  2654         Q_ASSERT(local_method_index > 0);
  2651         handle -= 5;
  2655         handle -= 5;
  2652         local_method_index--;
  2656         local_method_index--;