]> git.lyx.org Git - lyx.git/blobdiff - src/support/unicode.cpp
Remove ugly multiple definition hack
[lyx.git] / src / support / unicode.cpp
index 0e773f5327d67d0a1630ec2e66b9a1f62a0d5ec8..95415a5538e45ad11a4ed4695c5b277ae79024c3 100644 (file)
 
 #include "support/unicode.h"
 #include "support/debug.h"
+#include "support/mutex.h"
 
 #include <iconv.h>
 
 #include <boost/cstdint.hpp>
 
 #include <cerrno>
-#include <iomanip>
 #include <map>
 #include <ostream>
+//Needed in MSVC
 #include <string>
 
-#include <QMutexLocker>
 
 using namespace std;
 
@@ -67,7 +67,7 @@ struct IconvProcessor::Impl
        string tocode_;
        string fromcode_;
 
-       QMutex mutex_; // iconv() is not thread save
+       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;
@@ -377,7 +377,6 @@ int max_encoded_bytes(std::string const & encoding)
        // The CJK encodings use (different) multibyte representation as well.
        // All other encodings encode one UCS4 code point in one byte
        // (and can therefore only encode a subset of UCS4)
-       // Note that BIG5 and SJIS do not work with LaTeX (see lib/encodings).
        // Furthermore, all encodings that use shifting (like SJIS) do not work with
        // iconv_codecvt_facet.
        if (encoding == "UTF-8" ||