Silence warnings from Qt about saving too many painter states