Multiple QRegExp crashes when multithreading in KRunner

Andreas Pakulat apaku at
Fri Jan 14 19:28:04 GMT 2011

On 14.01.11 17:51:56, Albert Astals Cid wrote:
> A Divendres, 14 de gener de 2011, Sebastian Trueg va escriure:
> > However, the query parser still uses static QRegExp objects which seems
> > a bad idea, isn't that right?
> > Thus, I suppose it would be better to wrap them in a mutex'ed object and
> > create that via K_GLOBAL_STATIC?
> Why would you want to wait on a mutex to use a QRegExp? Just create as many 
> QRegExp as you need and that's it.

The problem is that QRegExp creation is anything but cheap, thats the
reason to keep pre-created QRegExp objects in the first place (at least
that was the reason in KDevelop).


There is a fly on your nose.

More information about the kde-core-devel mailing list