[Qt-interest] Segfault with static QProcess

Thiago Macieira thiago at kde.org
Wed Sep 15 01:41:50 CEST 2010


On Tuesday 14. September 2010 16.01.24 Volker Poplawski wrote:
> So QProcess has a crucial dependency to the static QProcessManager. What
> in  effect means QProcess must never be used in static context - Right?

"Never" is too strong here. In some circumstances, it might work.

Even though we say undefined, there is actually a very well-defined order of 
destruction, given the load order and the object-creation order. So in some 
circumstances it might reliably work.

> If so: could you please mention that in the docs? Would have saved me some
> time for sure.

This isn't about QProcess. This is about any static non-POD, so it really 
doesn't belong in QProcess's documentation.

Our recommendation is that you don't use ANY static, unless it's a POD or POD-
like type (or at the very least has a trivial destructor).

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100915/4d9250f3/attachment.bin 


More information about the Qt-interest-old mailing list