fix #11889
Added test for #11889
Corrected qDebug statements
Added test for #14045