port to qt5 QtSingleApplication