summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2011-10-07 14:45:47 +0200
committerJan-Arve Saether <jan-arve.saether@nokia.com>2011-10-07 14:45:47 +0200
commit1e8479b2aa781e6ce3fadf01294023fbc6ddbc22 (patch)
treef71430dfeddf810ab06ad496c3a31334537071ad /src/gui/dialogs
parenta0feeef52efde872c6d6e458c8e15616da0bf74f (diff)
don't lock the global mutex if there is nothing to protect
according to Thiago, setting the pointer with the same values *is* thread-safe Merge-request: 2655 Reviewed-by: Jan-Arve Saether <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index 45f6164ca2..32dbe4fc8d 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -55,10 +55,6 @@
#include <private/qsystemlibrary_p.h>
#include "qfiledialog_win_p.h"
-#ifndef QT_NO_THREAD
-# include <private/qmutexpool_p.h>
-#endif
-
#ifdef Q_WS_WINCE
#include <commdlg.h>
bool qt_priv_ptr_valid = false;
@@ -83,20 +79,7 @@ QT_BEGIN_NAMESPACE
static void qt_win_resolve_libs()
{
static bool triedResolve = false;
-
if (!triedResolve) {
-#ifndef QT_NO_THREAD
- // protect initialization
- QMutexLocker locker(QMutexPool::globalInstanceGet(&triedResolve));
- // check triedResolve again, since another thread may have already
- // done the initialization
- if (triedResolve) {
- // another thread did initialize the security function pointers,
- // so we shouldn't do it again.
- return;
- }
-#endif
-
#if !defined(Q_WS_WINCE)
QSystemLibrary lib(QLatin1String("shell32"));
ptrSHBrowseForFolder = (PtrSHBrowseForFolder)lib.resolve("SHBrowseForFolderW");