-rw-r--r-- | qmake/tools/qcomlibrary.cpp | 15 |
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 | |||
@@ -62,8 +62,12 @@ QComLibrary::QComLibrary( const QString &filename ) | |||
62 | QComLibrary::~QComLibrary() | 62 | QComLibrary::~QComLibrary() |
63 | { | 63 | { |
64 | if ( autoUnload() ) | 64 | if ( autoUnload() ) |
65 | unload(); | 65 | unload(); |
66 | if ( libiface ) | ||
67 | libiface->release(); | ||
68 | if ( entry ) | ||
69 | entry->release(); | ||
66 | } | 70 | } |
67 | 71 | ||
68 | bool QComLibrary::unload() | 72 | bool QComLibrary::unload() |
69 | { | 73 | { |
@@ -390,12 +394,11 @@ void QComLibrary::createInstanceInternal() | |||
390 | QCString key; | 394 | QCString key; |
391 | bool query_done = FALSE; | 395 | bool query_done = FALSE; |
392 | bool warn_mismatch = TRUE; | 396 | bool warn_mismatch = TRUE; |
393 | 397 | ||
394 | if ( ! query_done ) { | ||
395 | |||
396 | #ifdef QT_THREAD_SUPPORT | 398 | #ifdef QT_THREAD_SUPPORT |
397 | QMutexLocker locker( qt_global_mutexpool->get( &cache ) ); | 399 | QMutexLocker locker( qt_global_mutexpool ? |
400 | qt_global_mutexpool->get( &cache ) : 0 ); | ||
398 | #endif // QT_THREAD_SUPPORT | 401 | #endif // QT_THREAD_SUPPORT |
399 | 402 | ||
400 | if ( ! cache ) { | 403 | if ( ! cache ) { |
401 | cache = new QSettings; | 404 | cache = new QSettings; |
@@ -414,9 +417,8 @@ void QComLibrary::createInstanceInternal() | |||
414 | query_done = TRUE; | 417 | query_done = TRUE; |
415 | warn_mismatch = FALSE; | 418 | warn_mismatch = FALSE; |
416 | } | 419 | } |
417 | } | 420 | } |
418 | } | ||
419 | 421 | ||
420 | #if defined(Q_OS_UNIX) | 422 | #if defined(Q_OS_UNIX) |
421 | if ( ! query_done ) { | 423 | if ( ! query_done ) { |
422 | // get the query information directly from the plugin without loading | 424 | // get the query information directly from the plugin without loading |
@@ -460,13 +462,8 @@ void QComLibrary::createInstanceInternal() | |||
460 | << key | 462 | << key |
461 | << lastModified; | 463 | << lastModified; |
462 | 464 | ||
463 | if ( queried != reg ) { | 465 | if ( queried != reg ) { |
464 | |||
465 | #ifdef QT_THREAD_SUPPORT | ||
466 | QMutexLocker locker( qt_global_mutexpool->get( &cache ) ); | ||
467 | #endif // QT_THREAD_SUPPORT | ||
468 | |||
469 | cache->writeEntry( regkey, queried ); | 466 | cache->writeEntry( regkey, queried ); |
470 | // delete the cache, which forces the settings to be written | 467 | // delete the cache, which forces the settings to be written |
471 | delete cache; | 468 | delete cache; |
472 | cache = 0; | 469 | cache = 0; |