On terça-feira, 21 de janeiro de 2014 14:34:00, Marc Schmitzer wrote: > 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.
We can re-add the constructor with a bool as a private member, which will cause a compilation error for you. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest