Fix logical bug with Qt 5.0 workaround.