As I don't touch the menus there, either we change something global drawing related or it is a memory corruption or bug. If 23146 worked, can you try to do some kind of binary search with the changes to find the exact line which causes the problem?

It gets weirder. Here's what I did: I stated with r23146 and then added this code:

class RtlItemDelegate : public QItemDelegate {
public:
explicit RtlItemDelegate(QObject * parent = 0)
: QItemDelegate(parent) {}

protected:
virtual void drawDisplay(QPainter * painter,
QStyleOptionViewItem const & option,
QRect const & rect, QString const & text) const
{
// FIXME: do this more elegantly
docstring stltext = qstring_to_ucs4(text);
reverse(stltext.begin(), stltext.end());
QItemDelegate::drawDisplay(painter, option, rect, toqstr(stltext));
}
};

RtlItemDelegate rtlItemDelegate;

And then I get the drawing errors. Commenting out that last line fixes it, i.e., the declaration of rtlItemDelegate. Note that, at this point, it isn't actually doing anything. It's just been constructed.

Can you comment this line and replace the reference to it further down (the line which I asked you to comment out) by "new RtlItemDelegate"?

I wonder whether one mustn't create static global instances of this class.

Stefan

Reply via email to