diff options
author | Lorn Potter <lorn.potter@gmail.com> | 2015-08-20 16:00:05 +1000 |
---|---|---|
committer | Lorn Potter <lorn.potter@gmail.com> | 2015-09-07 07:58:41 +0000 |
commit | a7b94516e1412073eb9d3fb57e49315ef966b183 (patch) | |
tree | 7a60f4c0b096719d34b4b275b41c695e5eeccb24 /src/plugins | |
parent | 330bd7142dc4ef5682db971306441e7f8852af4e (diff) | |
download | qtsensors-a7b94516e1412073eb9d3fb57e49315ef966b183.tar.gz |
Only register plugins that sensorfw plugin can instantiate
This makes it possible to use Tilt sensor from generic plugin.
Task-number: QTBUG-47854
Change-Id: I14883e8d4a18a56c52845a4a5172c8c46bfe385f
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/sensors/sensorfw/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/sensors/sensorfw/main.cpp b/src/plugins/sensors/sensorfw/main.cpp index b22b647..9951f09 100644 --- a/src/plugins/sensors/sensorfw/main.cpp +++ b/src/plugins/sensors/sensorfw/main.cpp @@ -65,7 +65,8 @@ public: QStringList keys = settings.allKeys(); for (int i=0,l=keys.size(); i<l; i++) { QString type = keys.at(i); - QSensorManager::registerBackend(type.toLocal8Bit(), settings.value(type).toByteArray(), this); + if (settings.value(type).toString().contains(QStringLiteral("sensorfw")))//register only ones we know + QSensorManager::registerBackend(type.toLocal8Bit(), settings.value(type).toByteArray(), this); } } |