synched with Qwt 6.1 branch