[Interest] Removal of GUIenabled constructor argument of QApplication in Qt5

Marc Schmitzer marc.schmitzer at richard-wolf.com
Tue Jan 21 14:34:00 CET 2014


Hi,

I know I'm a little late to the party, but while trying to port our
project to Qt5, I just discovered that the QApplication constructor that
takes a "bool GUIenabled" argument has been removed. I cannot find any
mention of this in the official change lists.

This change is quite unfortunate for us because we have some programs
with "runtime optional" GUIs. These programs would simply instantiate a
QApplication, passing true as the GUIenabled argument only if the
"DISPLAY" environment variable was not empty. This all worked nicely.
Now, without that constructor, I have to explicitly instantiate
QApplication or QCoreApplication on the heap and keep it in a pointer.

Another problem is that the change does not break existing code, because
the "normal" QApplication constructor (int&,char**) actually has a third
argument (int) that is hidden from the docs. This means that existing
code will continue to compile, but pass one or zero as the third
argument, which normally defaults to QT_VERSION (0x05****).

I realize that this is more of a complaint than a question, but maybe
somebody here can shed some light on the story.

-- 
Mit freundlichen Gruessen / Best regards

Marc Schmitzer

SW-Entwicklung ESWL / ESWT
Software development ESWL / ESWT

*****************************************************************

Richard Wolf GmbH
Web:          http://www.richard-wolf.com

*****************************************************************
+++
Richard Wolf GmbH, Pforzheimer Strasse 32, 75438 Knittlingen
Managing Directors: Siegfried Karst, Juergen Pfab, Juergen Steinbeck. Trade Register: Mannheim HRB 510031
+++
Richard Wolf GmbH routinely monitors the content of e-mail sent and received via its network for the purposes of ensuring compliance with its policies and procedures. Richard Wolf GmbH is not responsible for any changes made to the message after it has been sent. Where opinions are expressed, they are not necessarily those of Richard Wolf GmbH. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended addressee, or the person responsible for delivering it to them, you may not copy, forward, disclose, or otherwise use it or any part of it in any way. To do so may be unlawful. If you receive this e-mail by mistake, please advise the sender immediately.
+++




More information about the Interest mailing list