Details
-
Type:
Suggestion
-
Status: Open
-
Priority:
P3: Somewhat important
-
Resolution: Unresolved
-
Affects Version/s: 4.7.1
-
Fix Version/s: None
-
Component/s: QML: Declarative and Javascript Engine
-
Labels:None
Description
There are times when you would like to use a module (service) that may or may not be available. For examples sensors. In a game sensors may provide additional control methods that are optional, and on a desktop or platform without sensors it would nice if it failed silently. Right now it's possible using a loader, but it's awkward and makes for poor example applications.
[13:26] <asj> in QML can you have a conditional import? basically like "if import QtMobility.sensors fails, well don't worry be happy"
[13:33] <blam> asj: I don't think so.. although it would be really good to have. One (awkward) way to check is to load the code that uses it using a Loader and then check Loader::status
[13:33] <blam> asj: could you file a suggestion for that please?