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

IMPLEMENT_READING() does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 1.0.1
    • 1.0.0
    • Sensors
    • None
    • common to any platforms
    • 7bde137bd9a626c8a0f826f9cbb56f92b6833311

      In qsensor.h, there is IMPLEMENT_READING MACRO defined as:

      #define IMPLEMENT_READING(classname)\
      IMPLEMENT_READING_D(classname, classname ## Private)

      #define IMPLEMENT_READING_D(classname, pclassname)\
      classname::classname(QObject *parent)\
      : QSensorReading(parent, new pclassname)\ // **** Problem! ***
      , d(d_ptr())\
      {}\

      The problem is that the QSensorReading's constructor asks for QSensorReadingPrivate as the type of 2nd parameter. It means an inherited class e.g. GlueSensorReadingPrivate has to be derived from the QSensorReadingPrivate. But the QSensorReadingPrivate is defined in qsensor_p.h that is not public (should not be referred directly).

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

            lramsay Lincoln Ramsay (closed Nokia identity) (Inactive)
            myang Mu Yang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes