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
@@ -64,4 +64,8 @@ QComLibrary::~QComLibrary()
if ( autoUnload() )
unload();
+ if ( libiface )
+ libiface->release();
+ if ( entry )
+ entry->release();
}
@@ -392,8 +396,7 @@ void QComLibrary::createInstanceInternal()
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
@@ -416,5 +419,4 @@ void QComLibrary::createInstanceInternal()
}
}
- }
#if defined(Q_OS_UNIX)
@@ -462,9 +464,4 @@ void QComLibrary::createInstanceInternal()
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