#include "support/docstream.h"
#include "support/lstrings.h"
#include "support/textutils.h"
-#include "support/ThreadStorage.h"
#include <map>
+#include <QThreadStorage>
using namespace std;
using namespace lyx::support;
docstring content;
typedef map<docstring, docstring> MangledMap;
- static ThreadStorage<MangledMap> tMangledNames;
- MangledMap & mangledNames = *tMangledNames;
- static ThreadStorage<int> tMangleID;
- int & mangleID = *tMangleID;
+ static QThreadStorage<MangledMap> tMangledNames;
+ static QThreadStorage<int> tMangleID;
+
+ MangledMap & mangledNames = tMangledNames.localData();
MangledMap::const_iterator const known = mangledNames.find(orig);
if (known != mangledNames.end())
}
}
- if (mangle)
+ if (mangle) {
+ int & mangleID = tMangleID.localData();
content += "-" + convert<docstring>(mangleID++);
- else if (isDigitASCII(content[content.size() - 1]))
+ } else if (isDigitASCII(content[content.size() - 1]))
content += ".";
mangledNames[orig] = content;