minor code changes to compile with Qt5