summaryrefslogtreecommitdiff
path: root/qmake/tools/qcomlibrary.cpp
Side-by-side diff
Diffstat (limited to 'qmake/tools/qcomlibrary.cpp') (more/less context) (show whitespace changes)
-rw-r--r--qmake/tools/qcomlibrary.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/qmake/tools/qcomlibrary.cpp b/qmake/tools/qcomlibrary.cpp
index a7162fc..2a1b75a 100644
--- a/qmake/tools/qcomlibrary.cpp
+++ b/qmake/tools/qcomlibrary.cpp
@@ -63,6 +63,10 @@ QComLibrary::~QComLibrary()
{
if ( autoUnload() )
unload();
+ if ( libiface )
+ libiface->release();
+ if ( entry )
+ entry->release();
}
bool QComLibrary::unload()
@@ -391,10 +395,9 @@ void QComLibrary::createInstanceInternal()
bool query_done = FALSE;
bool warn_mismatch = TRUE;
- if ( ! query_done ) {
-
#ifdef QT_THREAD_SUPPORT
- QMutexLocker locker( qt_global_mutexpool->get( &cache ) );
+ QMutexLocker locker( qt_global_mutexpool ?
+ qt_global_mutexpool->get( &cache ) : 0 );
#endif // QT_THREAD_SUPPORT
if ( ! cache ) {
@@ -415,7 +418,6 @@ void QComLibrary::createInstanceInternal()
warn_mismatch = FALSE;
}
}
- }
#if defined(Q_OS_UNIX)
if ( ! query_done ) {
@@ -461,11 +463,6 @@ void QComLibrary::createInstanceInternal()
<< lastModified;
if ( queried != reg ) {
-
-#ifdef QT_THREAD_SUPPORT
- QMutexLocker locker( qt_global_mutexpool->get( &cache ) );
-#endif // QT_THREAD_SUPPORT
-
cache->writeEntry( regkey, queried );
// delete the cache, which forces the settings to be written
delete cache;