Fixed compatibility with Qt 5.