diff options
author | p2niemel <pia.s.niemela@nokia.com> | 2011-04-08 18:39:15 +0300 |
---|---|---|
committer | p2niemel <pia.s.niemela@nokia.com> | 2011-04-08 18:39:15 +0300 |
commit | 761a67b2a6296b86a18dee55003269ee11a8b6f0 (patch) | |
tree | a7f062ea01cfe56caa2cb696a7b989b1f35270d3 | |
parent | fe24f6b8f27ba3c097de0762180ac3c3d09c31d5 (diff) |
polishing
-rw-r--r-- | plugins/sensors/meego/meegoaccelerometer.cpp | 8 | ||||
-rw-r--r-- | plugins/sensors/meego/meegoals.cpp | 7 | ||||
-rw-r--r-- | plugins/sensors/meego/meegocompass.cpp | 7 | ||||
-rw-r--r-- | plugins/sensors/meego/meegogyroscope.cpp | 8 | ||||
-rw-r--r-- | plugins/sensors/meego/meegolightsensor.cpp | 7 | ||||
-rw-r--r-- | plugins/sensors/meego/meegomagnetometer.cpp | 8 | ||||
-rw-r--r-- | plugins/sensors/meego/meegoorientationsensor.cpp | 7 | ||||
-rw-r--r-- | plugins/sensors/meego/meegorotationsensor.cpp | 8 |
8 files changed, 20 insertions, 40 deletions
diff --git a/plugins/sensors/meego/meegoaccelerometer.cpp b/plugins/sensors/meego/meegoaccelerometer.cpp index 4a1d097d6a..f3d519abfa 100644 --- a/plugins/sensors/meego/meegoaccelerometer.cpp +++ b/plugins/sensors/meego/meegoaccelerometer.cpp @@ -72,11 +72,9 @@ void meegoaccelerometer::slotFrameAvailable(const QVector<XYZ>& frame) } bool meegoaccelerometer::doConnect(){ - if (m_bufferSize==1? - QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const XYZ&)), this, SLOT(slotDataAvailable(const XYZ&))): - QObject::connect(m_sensorInterface, SIGNAL(frameAvailable(const QVector<XYZ>& )),this, SLOT(slotFrameAvailable(const QVector<XYZ>& )))) - return true; - return false; + if (m_bufferSize==1) + return QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const XYZ&)), this, SLOT(slotDataAvailable(const XYZ&))); + return QObject::connect(m_sensorInterface, SIGNAL(frameAvailable(const QVector<XYZ>& )),this, SLOT(slotFrameAvailable(const QVector<XYZ>& ))); } diff --git a/plugins/sensors/meego/meegoals.cpp b/plugins/sensors/meego/meegoals.cpp index 7e95574114..65d54b6d73 100644 --- a/plugins/sensors/meego/meegoals.cpp +++ b/plugins/sensors/meego/meegoals.cpp @@ -75,11 +75,8 @@ void meegoals::slotDataAvailable(const Unsigned& data) } bool meegoals::doConnect(){ - if (!(QObject::connect(m_sensorInterface, SIGNAL(ALSChanged(const Unsigned&)), - this, SLOT(slotDataAvailable(const Unsigned&))))){ - return false; - } - return true; + return QObject::connect(m_sensorInterface, SIGNAL(ALSChanged(const Unsigned&)), + this, SLOT(slotDataAvailable(const Unsigned&))); } diff --git a/plugins/sensors/meego/meegocompass.cpp b/plugins/sensors/meego/meegocompass.cpp index bbb14372a3..8d07be7e62 100644 --- a/plugins/sensors/meego/meegocompass.cpp +++ b/plugins/sensors/meego/meegocompass.cpp @@ -67,11 +67,8 @@ void meegocompass::slotDataAvailable(const Compass& data) bool meegocompass::doConnect(){ - if (!(QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const Compass&)), - this, SLOT(slotDataAvailable(const Compass&))))){ - return false; - } - return true; + return QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const Compass&)), + this, SLOT(slotDataAvailable(const Compass&))); } const QString meegocompass::sensorName(){ diff --git a/plugins/sensors/meego/meegogyroscope.cpp b/plugins/sensors/meego/meegogyroscope.cpp index c2a22406e0..317ea1daf3 100644 --- a/plugins/sensors/meego/meegogyroscope.cpp +++ b/plugins/sensors/meego/meegogyroscope.cpp @@ -73,11 +73,9 @@ void meegogyroscope::slotFrameAvailable(const QVector<XYZ>& frame) } bool meegogyroscope::doConnect(){ - if (m_bufferSize==1? - QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const XYZ&)), this, SLOT(slotDataAvailable(const XYZ&))): - QObject::connect(m_sensorInterface, SIGNAL(frameAvailable(const QVector<XYZ>& )),this, SLOT(slotFrameAvailable(const QVector<XYZ>& )))) - return true; - return false; + if (m_bufferSize==1) + return QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const XYZ&)), this, SLOT(slotDataAvailable(const XYZ&))); + return QObject::connect(m_sensorInterface, SIGNAL(frameAvailable(const QVector<XYZ>& )),this, SLOT(slotFrameAvailable(const QVector<XYZ>& ))); } const QString meegogyroscope::sensorName(){ diff --git a/plugins/sensors/meego/meegolightsensor.cpp b/plugins/sensors/meego/meegolightsensor.cpp index aa19eb0e11..cd2dc0f0a1 100644 --- a/plugins/sensors/meego/meegolightsensor.cpp +++ b/plugins/sensors/meego/meegolightsensor.cpp @@ -59,11 +59,8 @@ void meegolightsensor::slotDataAvailable(const Unsigned& data) } bool meegolightsensor::doConnect(){ - if (!(QObject::connect(m_sensorInterface, SIGNAL(ALSChanged(const Unsigned&)), - this, SLOT(slotDataAvailable(const Unsigned&))))){ - return false; - } - return true; + return QObject::connect(m_sensorInterface, SIGNAL(ALSChanged(const Unsigned&)), + this, SLOT(slotDataAvailable(const Unsigned&))); } diff --git a/plugins/sensors/meego/meegomagnetometer.cpp b/plugins/sensors/meego/meegomagnetometer.cpp index 69b92e4218..0fe43d8035 100644 --- a/plugins/sensors/meego/meegomagnetometer.cpp +++ b/plugins/sensors/meego/meegomagnetometer.cpp @@ -86,11 +86,9 @@ void meegomagnetometer::slotFrameAvailable(const QVector<MagneticField>& frame } bool meegomagnetometer::doConnect(){ - if (m_bufferSize==1? - QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const MagneticField&)), this, SLOT(slotDataAvailable(const MagneticField&))): - QObject::connect(m_sensorInterface, SIGNAL(frameAvailable(const QVector<MagneticField>& )),this, SLOT(slotFrameAvailable(const QVector<MagneticField>& )))) - return true; - return false; + if (m_bufferSize==1) + return QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const MagneticField&)), this, SLOT(slotDataAvailable(const MagneticField&))); + return QObject::connect(m_sensorInterface, SIGNAL(frameAvailable(const QVector<MagneticField>& )),this, SLOT(slotFrameAvailable(const QVector<MagneticField>& ))); } const QString meegomagnetometer::sensorName(){ diff --git a/plugins/sensors/meego/meegoorientationsensor.cpp b/plugins/sensors/meego/meegoorientationsensor.cpp index de777da886..2a4836ba90 100644 --- a/plugins/sensors/meego/meegoorientationsensor.cpp +++ b/plugins/sensors/meego/meegoorientationsensor.cpp @@ -71,11 +71,8 @@ void meegoorientationsensor::slotDataAvailable(const Unsigned& data) } bool meegoorientationsensor::doConnect(){ - if (!(QObject::connect(m_sensorInterface, SIGNAL(orientationChanged(const Unsigned&)), - this, SLOT(slotDataAvailable(const Unsigned&))))){ - return false; - } - return true; + return QObject::connect(m_sensorInterface, SIGNAL(orientationChanged(const Unsigned&)), + this, SLOT(slotDataAvailable(const Unsigned&))); } const QString meegoorientationsensor::sensorName(){ diff --git a/plugins/sensors/meego/meegorotationsensor.cpp b/plugins/sensors/meego/meegorotationsensor.cpp index 5a1943373a..6619ae4372 100644 --- a/plugins/sensors/meego/meegorotationsensor.cpp +++ b/plugins/sensors/meego/meegorotationsensor.cpp @@ -69,11 +69,9 @@ void meegorotationsensor::slotFrameAvailable(const QVector<XYZ>& frame) } bool meegorotationsensor::doConnect(){ - if (m_bufferSize==1? - QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const XYZ&)), this, SLOT(slotDataAvailable(const XYZ&))): - QObject::connect(m_sensorInterface, SIGNAL(frameAvailable(const QVector<XYZ>& )),this, SLOT(slotFrameAvailable(const QVector<XYZ>& )))) - return true; - return false; + if (m_bufferSize==1) + return QObject::connect(m_sensorInterface, SIGNAL(dataAvailable(const XYZ&)), this, SLOT(slotDataAvailable(const XYZ&))); + return QObject::connect(m_sensorInterface, SIGNAL(frameAvailable(const QVector<XYZ>& )),this, SLOT(slotFrameAvailable(const QVector<XYZ>& ))); } const QString meegorotationsensor::sensorName(){ |