Finally i fixed my code, and eliminated the "anachronistic old-style base class initializer" problem.

Now, i am back to the proper engine closing when the application stopped by clicking on its close button.