diff options
author | Thomas McGuire <thomas.mcguire.qnx@kdab.com> | 2012-07-02 13:39:00 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-03 02:10:06 +0200 |
commit | f7c3a6686ef77e95128f1dc4a03c7a8184a18231 (patch) | |
tree | 150ec0f8bac4e701cb913aed8cb2b27e43e7ad79 /src/sensors/qmagnetometer.h | |
parent | 1908f86c6d8cb28a81d02272dfd3443e827cf37c (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/qmagnetometer.h')
-rw-r--r-- | src/sensors/qmagnetometer.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sensors/qmagnetometer.h b/src/sensors/qmagnetometer.h index 4df83a1f..de165587 100644 --- a/src/sensors/qmagnetometer.h +++ b/src/sensors/qmagnetometer.h @@ -88,10 +88,13 @@ class Q_SENSORS_EXPORT QMagnetometer : public QSensor Q_PROPERTY(bool returnGeoValues) #endif public: - explicit QMagnetometer(QObject *parent = 0) : QSensor(QMagnetometer::type, parent) {} - virtual ~QMagnetometer() {} + explicit QMagnetometer(QObject *parent = 0); + virtual ~QMagnetometer(); QMagnetometerReading *reading() const { return static_cast<QMagnetometerReading*>(QSensor::reading()); } static char const * const type; + +private: + Q_DISABLE_COPY(QMagnetometer) }; QT_END_NAMESPACE |