From 8bfeec609fa39b6a4d3626569eeaf90e28b89783 Mon Sep 17 00:00:00 2001 From: Lincoln Ramsay Date: Tue, 12 Jun 2012 14:23:00 +1000 Subject: 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 --- src/imports/sensors/sensors.cpp | 3 --- src/imports/sensors2/sensors2.cpp | 3 --- 2 files changed, 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(uri, 5, 0, "Sensor", QLatin1String("Cannot create Sensor")); qmlRegisterType (uri, 5, 0, "TiltSensor"); qmlRegisterType (uri, 5, 0, "AmbientLightSensor"); -- cgit v1.2.3