Re: [osg-users] Bug in Qt thread integration

2013-01-24 Thread Vitezslav Zajic
Hi, I have run into the same problem with the application I'm working on. Since it seems to me that it was not corrected yet (or am I mistaken?), i'm writing here. I suggest that at least the static_cast is replaced with the dynamic_cast: Code: QtThreadPrivateData* pd =

Re: [osg-users] Bug in Qt thread integration

2012-10-03 Thread Chris Long
Hi, Thanks for the replies and suggestions. I think I might not have explained the issue as well as I thought, so I'll try again. QThread::currentThread does return a value with static type QThread*. However, it might not point to a QThread instance, but an instance of a subclass of QThread.

Re: [osg-users] Bug in Qt thread integration

2012-09-28 Thread Torben Dannhauer
Hi, In fact QThread::currentThread returns a QThread. maybe you want to use qobject_cast instead of other casts, it is has some other advantages (http://lists.qt.nokia.com/pipermail/qt-interest/2010-October/028327.html). Cheers, Torben -- Read this topic online here:

[osg-users] Bug in Qt thread integration

2012-09-27 Thread Chris Long
Hi, We have a large app that uses Qt for its 2D UI and OSG for 3D rendering and UI. So it seemed like a good idea to turn on the Qt-OpenThreads integration by enabling BUILD_OPENTHREADS_WITH_QT. However, I discovered that OpenThreads::Thread::CurrentThread() (in

Re: [osg-users] Bug in Qt thread integration

2012-09-27 Thread Aurelien Albert
Hi, I'm surprised that QThread::currentThread() can return something else than a QThread instance. But if this is really the case, the following should solve the issue : Code: QThread* pQThread = dynamic_cast QThread* (QThread::currentThread()); if (pQThread != NULL) { QtThreadPrivateData*