Merged part of master-debug: dumb ifs to Q_ASSERT_X.
Fixes after refactoring.
Fixed the previous merge.
Merge branch 'master' into master-debug.