summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLincoln Ramsay <lincoln.ramsay@nokia.com>2012-06-12 14:23:00 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-13 01:43:22 +0200
commit8bfeec609fa39b6a4d3626569eeaf90e28b89783 (patch)
treed8025fb745f323293105f82f202a9a7d8fd7096b
parent9f5fa80c05d034876a2cf308cf1c825cd2bc772b (diff)
Don't initialize sensors from registerTypes().
This function gets called on a different thread... we don't really want that so just don't do that. Change-Id: I58dc0c0bc8d54221a0b6fd306552b67e2abf0235 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
-rw-r--r--src/imports/sensors/sensors.cpp3
-rw-r--r--src/imports/sensors2/sensors2.cpp3
2 files changed, 0 insertions, 6 deletions
diff --git a/src/imports/sensors/sensors.cpp b/src/imports/sensors/sensors.cpp
index f65af6a2..b81bdd3d 100644
--- a/src/imports/sensors/sensors.cpp
+++ b/src/imports/sensors/sensors.cpp
@@ -106,9 +106,6 @@ public:
int major;
int minor;
- // Force all of the sensors initialization to happen now, while we don't have a UI thread to interrupt
- (void)QSensor::sensorTypes();
-
// Register the 1.1 interfaces
major = 1;
minor = 1;
diff --git a/src/imports/sensors2/sensors2.cpp b/src/imports/sensors2/sensors2.cpp
index 190ecde0..d85f0c55 100644
--- a/src/imports/sensors2/sensors2.cpp
+++ b/src/imports/sensors2/sensors2.cpp
@@ -59,9 +59,6 @@ public:
qDebug() << "QSensors2DeclarativeModule::registerTypes(const char *uri)";
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtSensors"));
- // Force all of the sensors initialization to happen now, while we don't have a UI thread to interrupt
- (void)QSensor::sensorTypes();
-
qmlRegisterUncreatableType<qsensor2common >(uri, 5, 0, "Sensor", QLatin1String("Cannot create Sensor"));
qmlRegisterType <QSensor2Tilt >(uri, 5, 0, "TiltSensor");
qmlRegisterType <QSensor2AmbientLight>(uri, 5, 0, "AmbientLightSensor");