Patch to https://bugreports.qt-project.org/browse/QTBUG-35670
Patch to https://bugreports.qt-project.org/browse/QTBUG-35731