kdevelop exitting on its own - GOTCHA!

René J.V. Bertin rjvbertin at gmail.com
Sat Nov 15 20:42:42 GMT 2014


On Saturday November 15 2014 21:23:44 Milian Wolff wrote:

> I don't see it in those branches either.

I haven't found it either, nor any trace of KGlobal being inherited and ref/deref called that way.

> Indeed, s_refCount being a plain int sounds troublesome. You could either:
> 
> a) add an assertion in there that its only ever being called form the main 
> thread:
> 
>     Q_ASSERT(QThread::currentThread() == qApp->thread())

But do we know whether this should only be called on the main thread? I would assume that's not the case, or is it "forbidden" to start a KJob from inside a KJob?

> b) make it a QAtomicInt<int>
> 
> This should be the "fix" if we decide that this should be threadsafe.

Ah. So much for the modification I'm currently testing, but I take it QAtomicInt does the same as the interlocked increment/decrement?

Cheers,
René



More information about the KDevelop mailing list