It's connected directly to QCoreApplication::quit() in QQmlApplicationEngine.
This is inconsistent because if you declare a Shortcut:
that's useful on most platforms, but on macOS your application has a Quit menu item independently. And that will send a QCloseEvent. The intention after we fix
QTBUG-33235 is that any window should be able to veto the closing by rejecting the close event, in a QML onClosing handler. So the consistent cross-platform way to prompt "are you sure" in QML, to save files or whatever, is to implement Window.onClosing(). (You could do that in the Shortcut.onActivated() handler, but it won't work on macOS.) So if you have done that, and you also create a quit Shortcut for non-mac platforms, it needs to end up exiting in the same way, whether you get there via the Shortcut or via the menu item.
This will be consistent with widget-based applications: on macOS if you create a Quit menu item, it will be functional, and your widget windows can handle the close event and veto the closing. If you don't create the Quit menu item, you will still get one automatically, and it will work the same way as if you had created it.