diff options
Diffstat (limited to 'src/tools/qregexp.cpp')
-rw-r--r-- | src/tools/qregexp.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/tools/qregexp.cpp b/src/tools/qregexp.cpp index 5c0fac766..2ee6635da 100644 --- a/src/tools/qregexp.cpp +++ b/src/tools/qregexp.cpp @@ -52,10 +52,10 @@ #include "ntqstring.h" #include "ntqtl.h" -#ifdef TQT_THREAD_SUPPORT +#ifndef TQT_NO_THREAD #include "ntqthreadstorage.h" #include <private/qthreadinstance_p.h> -#endif // TQT_THREAD_SUPPORT +#endif // TQT_NO_THREAD #undef TQT_TRANSLATE_NOOP #define TQT_TRANSLATE_NOOP( context, sourceText ) sourceText @@ -3212,25 +3212,25 @@ struct TQRegExpPrivate #ifndef TQT_NO_REGEXP_OPTIM static TQSingleCleanupHandler<TQCache<TQRegExpEngine> > cleanup_cache; -# ifndef TQT_THREAD_SUPPORT +# ifdef TQT_NO_THREAD static TQCache<TQRegExpEngine> *engineCache = 0; -# endif // TQT_THREAD_SUPPORT +# endif // TQT_NO_THREAD #endif // TQT_NO_REGEXP_OPTIM static void regexpEngine( TQRegExpEngine *&eng, const TQString &pattern, bool caseSensitive, bool deref ) { -# ifdef TQT_THREAD_SUPPORT +#ifndef TQT_NO_THREAD static TQThreadStorage<TQCache<TQRegExpEngine> *> engineCaches; TQCache<TQRegExpEngine> *engineCache = 0; TQThreadInstance *currentThread = TQThreadInstance::current(); if (currentThread) engineCache = engineCaches.localData(); -#endif // TQT_THREAD_SUPPORT +#endif // TQT_NO_THREAD if ( !deref ) { #ifndef TQT_NO_REGEXP_OPTIM -# ifdef TQT_THREAD_SUPPORT +# ifndef TQT_NO_THREAD if ( currentThread ) # endif { @@ -3251,18 +3251,18 @@ static void regexpEngine( TQRegExpEngine *&eng, const TQString &pattern, if ( eng->deref() ) { #ifndef TQT_NO_REGEXP_OPTIM -# ifdef TQT_THREAD_SUPPORT +# ifndef TQT_NO_THREAD if ( currentThread ) # endif { if ( engineCache == 0 ) { engineCache = new TQCache<TQRegExpEngine>; engineCache->setAutoDelete( TRUE ); -# ifdef TQT_THREAD_SUPPORT +# ifndef TQT_NO_THREAD engineCaches.setLocalData(engineCache); # else cleanup_cache.set( &engineCache ); -# endif // !TQT_THREAD_SUPPORT +# endif // TQT_NO_THREAD } if ( !pattern.isNull() && engineCache->insert(pattern, eng, 4 + pattern.length() / 4) ) |