diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py index e2d05e1053..cd163ad840 100644 --- a/development/scons/scons_manifest.py +++ b/development/scons/scons_manifest.py @@ -308,6 +308,7 @@ src_support_header_files = Split(''' lyxalgo.h lyxlib.h lyxtime.h + mutex.h Messages.h numpunct_lyx_char_type.h os.h @@ -348,6 +349,7 @@ src_support_files = Split(''' lassert.cpp lstrings.cpp lyxtime.cpp + mutex.cpp Messages.cpp os.cpp Package.cpp diff --git a/src/support/Makefile.am b/src/support/Makefile.am index a6287330b4..9a8fccf61c 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -71,6 +71,8 @@ liblyxsupport_a_SOURCES = \ lyxlib.h \ lyxtime.cpp \ lyxtime.h \ + mutex.h \ + mutex.cpp \ Messages.cpp \ Messages.h \ numpunct_lyx_char_type.h \ diff --git a/src/support/unicode.cpp b/src/support/unicode.cpp index dec1e9c0c6..b48f10609f 100644 --- a/src/support/unicode.cpp +++ b/src/support/unicode.cpp @@ -14,6 +14,7 @@ #include "support/unicode.h" #include "support/debug.h" +#include "support/mutex.h" #include @@ -25,7 +26,6 @@ #include #include -#include using namespace std; @@ -67,7 +67,7 @@ struct IconvProcessor::Impl string tocode_; string fromcode_; - QMutex mutex_; // iconv() is not thread save, see #7240 + Mutex mutex_; // iconv() is not thread save, see #7240 }; @@ -124,7 +124,7 @@ bool IconvProcessor::init() int IconvProcessor::convert(char const * buf, size_t buflen, char * outbuf, size_t maxoutsize) { - QMutexLocker lock(&pimpl_->mutex_); + Mutex::Locker lock(&pimpl_->mutex_); if (buflen == 0) return 0;