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

[QtSensors] Fix all binding loops caused by misuse of bindable properties

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • 6.5, 6.6.0 FF
    • Core: Other
    • None

      Fix all properties that will fail the test implemented in QTBUG-116345.

      In general case, the fix would be as simple as calling valueBypassingBindings() instead of simply accessing the property in the setter (see the epic for a code example).

      The scope of this task is to implement fixes in qtsensors submodule.

      Using git-grep, I managed to get the following list of files that contain bindable properties:

      ~/qt5/qtsensors$ git grep -rI --name-only --recurse-submodules "Q_OBJECT_COMPAT_PROPERTY\|Q_OBJECT_COMPUTED_PROPERTY\|Q_OBJECT_BINDABLE_PROPERTY"
      src/sensors/make_sensor.pl
      src/sensorsquick/qmlaccelerometer_p.h
      src/sensorsquick/qmlambientlightsensor_p.h
      src/sensorsquick/qmlambienttemperaturesensor_p.h
      src/sensorsquick/qmlcompass_p.h
      src/sensorsquick/qmlgyroscope_p.h
      src/sensorsquick/qmlhumiditysensor_p.h
      src/sensorsquick/qmlirproximitysensor_p.h
      src/sensorsquick/qmllidsensor_p.h
      src/sensorsquick/qmllightsensor_p.h
      src/sensorsquick/qmlmagnetometer_p.h
      src/sensorsquick/qmlorientationsensor_p.h
      src/sensorsquick/qmlpressuresensor_p.h
      src/sensorsquick/qmlproximitysensor_p.h
      src/sensorsquick/qmlrotationsensor_p.h
      src/sensorsquick/qmlsensor_p.h
      src/sensorsquick/qmltapsensor_p.h
      src/sensorsquick/qmltiltsensor_p.h
      

      If it turns out that some of the classes are missing the tests for bindable properties, or if the tests do not use the QTestPrivate helpers, then the missing tests should be added.

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

            ivan.solovev Ivan Solovev
            ivan.solovev Ivan Solovev
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes