Merged part of master-debug: dumb ifs to Q_ASSERT_X.