Re: [Interest] Can QObject::tr() be used in initialization of static const QString data members? [Qt 5.5.1, Windows]

2015-11-12 Thread Thiago Macieira
On Thursday 12 November 2015 15:59:06 Alejandro Exojo wrote: > El Tuesday 10 November 2015, Thiago Macieira escribió: > > > What's the problem with static QString? > > > > There's no actual error or problem, but it's just poor coding practice. > > That certainly has surprised me. If you just mean

Re: [Interest] Can QObject::tr() be used in initialization of static const QString data members? [Qt 5.5.1, Windows]

2015-11-12 Thread Alejandro Exojo
El Tuesday 10 November 2015, Thiago Macieira escribió: > > What's the problem with static QString? > > There's no actual error or problem, but it's just poor coding practice. That certainly has surprised me. If you just mean that it could be abused, and that it could > It's a static non-trivia

Re: [Interest] Can QObject::tr() be used in initialization of static const QString data members? [Qt 5.5.1, Windows]

2015-11-10 Thread Matthew Woehlke
On 2015-11-10 13:00, Thiago Macieira wrote: > On Tuesday 10 November 2015 11:31:57 Matthew Woehlke wrote: >> On 2015-11-09 17:35, Thiago Macieira wrote: >>> I advise against static QStrings altogether. Just don't do that. >> >> What's the problem with static QString? > > There's no actual error or

Re: [Interest] Can QObject::tr() be used in initialization of static const QString data members? [Qt 5.5.1, Windows]

2015-11-10 Thread Thiago Macieira
On Tuesday 10 November 2015 11:31:57 Matthew Woehlke wrote: > On 2015-11-09 17:35, Thiago Macieira wrote: > > I advise against static QStrings altogether. Just don't do that. > > What's the problem with static QString? There's no actual error or problem, but it's just poor coding practice. It's

Re: [Interest] Can QObject::tr() be used in initialization of static const QString data members? [Qt 5.5.1, Windows]

2015-11-10 Thread Matthew Woehlke
On 2015-11-09 17:35, Thiago Macieira wrote: > I advise against static QStrings altogether. Just don't do that. What's the problem with static QString? -- Matthew ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/lis

Re: [Interest] Can QObject::tr() be used in initialization of static const QString data members? [Qt 5.5.1, Windows]

2015-11-09 Thread Thiago Macieira
On Monday 09 November 2015 11:28:45 Phil Weinstein wrote: > We're not currently using Qt translation. But, FWIW, if we were to, I > guess we would initialize static QStrings in the following way (and not > worry about them being 'const'): I advise against static QStrings altogether. Just don't do

Re: [Interest] Can QObject::tr() be used in initialization of static const QString data members? [Qt 5.5.1, Windows]

2015-11-09 Thread Phil Weinstein
Thiago, thanks so much for your precise reply. We will remove QObject::tr() from static const QString initializations. We're not currently using Qt translation. But, FWIW, if we were to, I guess we would initialize static QStrings in the following way (and not worry about them being 'const')

Re: [Interest] Can QObject::tr() be used in initialization of static const QString data members? [Qt 5.5.1, Windows]

2015-11-04 Thread Thiago Macieira
On Wednesday 04 November 2015 15:54:41 Phil Weinstein wrote: > QUESTION: Is there a way to force the initialization of QMetaObject data > to avoid this CRASH in Qt5? Even if you could do this, you don't want it. > Our large Qt 4.8 application makes use of *Object::tr()* to initialize > static con

[Interest] Can QObject::tr() be used in initialization of static const QString data members? [Qt 5.5.1, Windows]

2015-11-04 Thread Phil Weinstein
QUESTION: Is there a way to force the initialization of QMetaObject data to avoid this CRASH in Qt5? Our large Qt 4.8 application makes use of *Object::tr()* to initialize static const QString data members. *This is crashing in Qt5* due to dereferencing a NULL pointer in a QMetaObject. An ab