Wouldn't it make sense to make the QCoreApplication::Type enumeration reflect the available application types in Qt 5, and propagate the getter from QApplication::type() to QCoreApplication::type()?
It could offer values like Tty(or even simply Core?),Gui,Widgets instead.
It is very confusing that currently QApplication::type() returns Tty when QGuiApplication was instantiated. As a side effect, instantiating QWidget in a GUI application throws a misleading fatal error: