Moving methods from MainWindow to QGCApplication so that more things can run without a window. Helpful for testing.
So no need for connect window close test here