On Thursday, 13 de January de 2011 15:08:06 Aaron J. Seigo wrote: > On Thursday, January 13, 2011, Thiago Macieira wrote: > > On Thursday, 13 de January de 2011 22:43:28 Matthias Fuchs wrote: > > > Hi, > > > > > > There are some crashes related to QRegExp and multithreading, so > > > they > > > appear when using KRunner. > > > > There should be no crashes related to QRegExp and threading since Qt > > 4.4. > > If you find something, it's usually because you used the same QRegExp > > object to conduct searches at the same time. > > yes, that's exactly what's happening :) Matthias already fixed one krunner > plugin that was doing this, but not he's faced with the > Nepomuk::Query::QueryParser bits. > > as it is internal to Nepomuk and it is using static members internal to the > library (meaning krunner or any other app can't just use a "different > Nepomuk object") QThreadStorage seems the easiest solution here.
Nah.
Just create a copy on the stack:
QRegExp rx = theRx;
if (rx.indexIn(str) != 0) { ... }
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
signature.asc
Description: This is a digitally signed message part.
