made changes for compatibility with Qt 5.2.1