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

QValueSpaceSubscriber::contentsChanged() signal is not emitted when contents are changed with QValueSpacePublisher::setValue() API.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 1.1.0
    • Publish & Subscribe
    • None
    • MADDE build 64.
      library files are taken from qt-mobility source 1.1.0 (qt-mobility-1.1.0~git20100825).
      Same in scratchbox and on device with flash image version 0.2010.36-3.

      When i change a value of a key using QValueSpacePublisher::setValue() API, the QValueSpaceSubscriber::contentsChanged() signal is not emitted. Please see the code a below.

      BatteryCharger::BatteryCharger()
      {
      publisher = new QValueSpacePublisher("/Battery");
      subscriber = new QValueSpaceSubscriber("/Battery");
      connect(subscriber, SIGNAL(contentsChanged()), this, SLOT(chargeStateChanged()));

      publisher->setValue("charging", charge);
      }

      void BatteryCharger::chargeStateChanged()
      {
      if(subscriber->value("charging") == QVariant(true))
      timer.start();
      else
      timer.stop();
      }

      NOTE: When i do subscriber->value("charging") the value is still 0.

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

            amccarth Aaron McCarthy (closed Nokia identity) (Inactive)
            sumank Madamsetty Suman Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes