diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-02-24 14:18:40 +0100 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-02-24 14:18:40 +0100 |
commit | 4220464fd54beb0fd101bdf8e48d5ea9840035b6 (patch) | |
tree | 7b523fe8b89ade50cfbedb968cdfbbc71302cbd4 /src/ui/cameraui.cpp | |
parent | acd7b7bff1753fc22d72a2148149057d11a344e0 (diff) |
Workaround for setEnabled calls from scripts.1.1beta
Reviewed-by: owolff
Diffstat (limited to 'src/ui/cameraui.cpp')
-rw-r--r-- | src/ui/cameraui.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/cameraui.cpp b/src/ui/cameraui.cpp index 82059bb..fe65ee5 100644 --- a/src/ui/cameraui.cpp +++ b/src/ui/cameraui.cpp @@ -146,7 +146,11 @@ void CameraUi::emitCameraDataChange() const void CameraUi::showCameraInfo() { bool editingEnabled = mCameras->count() != 0; - enableCameraControls(editingEnabled); + // workaround for calling this from another thread (scripts): + // always perform the setEnabled calls in the gui thread - + // setEnabled calls sendEvent! + QMetaObject::invokeMethod(this, "enableCameraControls", Qt::QueuedConnection, + Q_ARG(bool, editingEnabled)); if (!editingEnabled) return; |