It turns out that the problems with notes not displaying on MacOS X was also caused by a static initializer conflict, this time in colours.cpp. Basically:

- On most platforms, static initializers in the qt shared libraries get executed before static initializers in the main application.
- On Mac OS X, it works the other way around, and the C++ standard does not really make promises either way.
- If you execute the QColor::QColor(QColor &) copy constructor to copy stuff like Qt::black, the global Qt colors get initialized dynamically.
- If this happens BEFORE the Qt static initializers run, you have a bad situation, because the initializers will then
de-initialize the colors again.
- My patch replaces references to Qt::whatever with the hardcoded color values. This is not all that pretty, but the probability of Qt::red being changed to a different RGB value are pretty low :-)

Matthias

Attachment: Colour_Static.patch
Description: Binary data



Reply via email to