On segunda-feira, 29 de julho de 2013 20:38:38, David Faure wrote: > Now Oswald suggests that apps *could* set up QLocale and QTranslator before > instanciating qapp, and therefore qapp could create a QCommandLineParser > instance and feed its options into it, and use it for parsing. Not sure how > much this can really work, Thiago always says Qt APIs shouldn't be used > before the QCoreApp ctor (e.g. no local8Bit etc.). So it sounds a bit too > experimental to me.
Correct. QLocale sets itself up, which is not a problem. QTranslator takes filenames as parameters. That requires the locale 8-bit codec to be working. That *only* works after QCoreApplication has been instantiated. So I'm against using QTranslator before QCoreApplication. We should not recommend any mainstream API to be used before QCoreApplication. The creation of the application object should generally be the first thing in the main function. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
