This bug is similar to
QTBUG-64080 but has a different root cause and I've written a separate patch for it.
Suppose I have a QML Camera object and a web cam connected to the PC. First I initialise the camera object with default one:
Then I unplug the camera and reassign myCamera to the default device (which is no camera now).
Then I see the error
and myCamera.cameraStatus never gets out from Camera.LoadingStatus.
Steps to reproduce:
I've written a little reproducer project following the design of QDeclarativeCamera class from ./imports/multimedia/qdeclarativecamera.cpp which you can use to make this bug emerge.
- Connect a camera to the PC
- Run the reproducer. You should see messages like "status: 2" and "status: 4". This is the values of QCamera::status() of the default Camera.
- When you see "Please unplug the DEFAULT camera within 10 seconds" message please do that and wait a little bit
- The program will unload the camera, change it to the default device and will try to load it. As the result you should see the status changing from 3 to 1, then to 2 and finally you should see the error message I was talking about earlier and then nothing