diff options
author | Lincoln Ramsay <lincoln.ramsay@nokia.com> | 2012-06-12 14:23:00 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-13 01:43:22 +0200 |
commit | 8bfeec609fa39b6a4d3626569eeaf90e28b89783 (patch) | |
tree | d8025fb745f323293105f82f202a9a7d8fd7096b /src | |
parent | 9f5fa80c05d034876a2cf308cf1c825cd2bc772b (diff) | |
download | qtsensors-8bfeec609fa39b6a4d3626569eeaf90e28b89783.tar.gz |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/sensors/sensors.cpp | 3 | ||||
-rw-r--r-- | src/imports/sensors2/sensors2.cpp | 3 |
2 files changed, 0 insertions, 6 deletions
diff --git a/src/imports/sensors/sensors.cpp b/src/imports/sensors/sensors.cpp index f65af6a..b81bdd3 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 190ecde..d85f0c5 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"); |