summaryrefslogtreecommitdiffstats
path: root/src/sensors/qsensor_p.h
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2012-07-02 13:39:00 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-03 02:10:06 +0200
commitf7c3a6686ef77e95128f1dc4a03c7a8184a18231 (patch)
tree150ec0f8bac4e701cb913aed8cb2b27e43e7ad79 /src/sensors/qsensor_p.h
parent1908f86c6d8cb28a81d02272dfd3443e827cf37c (diff)
QSensor: Use standard Qt dpointer pattern
Now it is possible to extend QSensor subclasses without breaking binary compatibility. In addition, de-inline the constructors and destructors of subclasses to make it possible to replace them without compatibility problems. Change-Id: I69de97002ade3e75f090761f852a5aca39c0f555 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Diffstat (limited to 'src/sensors/qsensor_p.h')
-rw-r--r--src/sensors/qsensor_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sensors/qsensor_p.h b/src/sensors/qsensor_p.h
index 5375b901..d5d8c424 100644
--- a/src/sensors/qsensor_p.h
+++ b/src/sensors/qsensor_p.h
@@ -55,13 +55,16 @@
#include "qsensor.h"
+#include "private/qobject_p.h"
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
typedef QList<QSensorFilter*> QFilterList;
-class QSensorPrivate
+class QSensorPrivate : public QObjectPrivate
{
+ Q_DECLARE_PUBLIC(QSensor)
public:
QSensorPrivate()
: identifier()
@@ -79,6 +82,8 @@ public:
{
}
+ void init(const QByteArray &sensorType);
+
// meta-data
QByteArray identifier;
QByteArray type;