mrjt Messages: 705 Registered: March 2007 Location: London
Contributor
I have attached two screen shots of the same U++ test program running on KDE 3.5.4. I have used a tool to change the GTK theme so that it matches the QT/KDE theme. This works perfectly in GIMP for instance.
There are two issues:
1) The only difference is the addition of the 'MT' compile flag to the second shot. I can see no reason why this should affect the theming, and there is no #define flagNOGTK anywhere in my source or uppsrc except one for OSX.
2) The scrollbar in the second shot is incorrect. Many of the KDE themes have the extra button on the right/bottom including the default one and GTK seems to support it. The extra button does not function here. If the scrollbar is disabled all the buttons are drawn in the right places, but do not appear disabled.
I've had a look at the source and it seems this might be difficult to fix, but let me know if you'd like me to do any further testing.
(HeapImg.h:34, heap.cpp:186)
This code is the sole difference between correct/incorrect theming. With the '__thread' declaration theming is correct, without it always appears as 'Classic' style.
Hypothesis: our overloaded operator new/delete has a problem with Qt new/delete (this "thread__" variable is per-thread allocator cache).
Please, try with USEMALLOC to test this.
(OTOH, if this proves to be true, I would be really unhappy, because unless there is some magic way how to solve this, we have only two options - poor performance in MT or KDE compatibility...
Ops, I have missed that is actually WORKS with MT... (thought it is otherwise).
Well, this looks like very likely new hypothesis:
KDE is multithreaded and needs multithreaded memory allocator
Actually, this could even explain some mysterious MacOS behaviour we have encountered recently too...
Anyway, this should USEMALLOC fix too (then it would use regular malloc and everything should be OK). This is really strange, with USEMALLOC, that mcache variable is #ifdefed out of code...