Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-7957

Setting the same QObject on multiple QmlContext's will only be visible to the first context

    XMLWordPrintable

Details

    • 87d71b29a8c4239cb807f13ac9d009cef1ca1a69

    Description

      Since QObjectPrivate::declarative_data registers new QmlContext objects and tries to reuse them, the same objects will not be visible to other context's

      --- a/src/declarative/qml/qmlobjectscriptclass.cpp
      +++ b/src/declarative/qml/qmlobjectscriptclass.cpp
      @@ -146,7 +146,7 @@ QmlObjectScriptClass::queryProperty(QObject *obj, const Identifier &name,
           QmlEnginePrivate *enginePrivate = QmlEnginePrivate::get(engine);
       
           QmlPropertyCache *cache = 0;
      -    QmlDeclarativeData *ddata = QmlDeclarativeData::get(obj);
      +    QmlDeclarativeData *ddata = 0;
           if (ddata)
               cache = ddata->propertyCache;
           if (!cache) {
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            aakenned Aaron Kennedy
            hhartz Henrik Hartz (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes