Merge "Protect against IllegalStateException in Looper.prepareMainLooper" into qt-dev