Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-536

Declarative DeviceInfo API has issues

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 1.1.0
    • 1.1.0
    • System Information
    • None
    • bc4efd43eb28c8b7fe4242832660b02fedfae7fe

    Description

      The DeviceInfo element (QSystemDeviceInfo) has a "batteryStatus" property
      with the following possible enumerated values NoBatteryLevel, BatteryCritical,
      BatteryVeryLow, BatteryLow, BatteryNormal and a "currentPowerState" property
      with the following possible enumerated values UnknownPower, BatteryPower,
      WallPower, WallPowerChargingBattery

      ISSUES: the value of the batteryStatus property (and also e.g. the batteryLevel
      property) is just as "current" as that of the "currentPowerState", yet only the
      latter has "current" in the name. "powerSource" would be a better name instead
      of "currentPowerState". The same argument can be made for all the "current"
      properties like "currentBluetoothPowerState", which also confusingly enough is
      not of "PowerState" enumerated type at all (like that of "currentPowerState" is),
      but rather a boolean.

      E.g. "bluetoothIsPowered" would be a more appropriate name. Note the declarative
      (right term?) nature of the suggested name, appropriate for a property used in
      declarative QML, suggesting the "isDeviceLocked" property should be
      "deviceIsLocked". More issues can be raised; is it really "WallPower" not
      "MainsPowered"? shouldn't "BatteryNormal" be "BatteryGood"

      Attachments

        Activity

          People

            lopotter Lorn Potter (closed Nokia identity) (Inactive)
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: