From 1e8479b2aa781e6ce3fadf01294023fbc6ddbc22 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 7 Oct 2011 14:45:47 +0200 Subject: 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 --- src/gui/dialogs/qfiledialog_win.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/gui/dialogs') 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 #include "qfiledialog_win_p.h" -#ifndef QT_NO_THREAD -# include -#endif - #ifdef Q_WS_WINCE #include 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"); -- cgit v1.2.3