[Development] Rationalizing qApp and qGuiApp

Thiago Macieira thiago.macieira at intel.com
Sat Jan 18 19:02:21 CET 2020


On sábado, 18 de janeiro de 2020 02:03:33 PST Sze Howe Koh wrote:
> * There is no equivalent of qGuiApp for QCoreApplication and QApplication.

QCoreApplication::instance(), with suitable static_cast when you know what you 
have.

> A) Update the documentation to say that qApp can change types. Leave
> the qApp macro as-is.
> 
> B) Leave the documentation as-is. Make the qApp macro disappear from
> qcoreapplication.h and qguiapplication.h unless compatibility mode is
> enabled.
> 
> C) Rename "QApplication" -> "QWidgetApplication", keeping the former
> as a typedef. Leave the qApp macro as-is but deprecated. Add the
> qCoreApp and qWidgetApp macros (analogous to qGuiApp)

I prefer (A), possibly also deprecating the macro entirely.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products





More information about the Development mailing list