From c57965fac1202bcb0818cb842b19070cfb9c8c3f Mon Sep 17 00:00:00 2001 From: huxingyi Date: Fri, 16 Oct 2020 20:19:15 +0930 Subject: [PATCH] Remove QUuid::Id128 [skip appveyor] Which requires Qt 5.11 --- src/meshgenerator.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/meshgenerator.cpp b/src/meshgenerator.cpp index 49cfdb7d..06e0ee1a 100644 --- a/src/meshgenerator.cpp +++ b/src/meshgenerator.cpp @@ -1728,7 +1728,12 @@ void MeshGenerator::setDefaultPartColor(const QColor &color) QString MeshGenerator::reverseUuid(const QString &uuidString) { QUuid uuid(uuidString); - QString newRawId = uuid.toString(QUuid::Id128); + QString newIdString = uuid.toString(); + QString newRawId = newIdString.mid(1, 8) + + newIdString.mid(10, 4) + + newIdString.mid(15, 4) + + newIdString.mid(20, 4) + + newIdString.mid(25, 12); std::reverse(newRawId.begin(), newRawId.end()); return "{" + newRawId.mid(0, 8) + "-" + newRawId.mid(8, 4) + "-" + @@ -1840,6 +1845,10 @@ void MeshGenerator::generate() m_cacheContext = new GeneratedCacheContext; needDeleteCacheContext = true; } else { + //qDebug() << "m_cacheContext->parts.size:" << m_cacheContext->parts.size(); + //qDebug() << "m_cacheContext->components.size:" << m_cacheContext->components.size(); + //qDebug() << "m_cacheContext->cachedCombination.size:" << m_cacheContext->cachedCombination.size(); + m_cacheEnabled = true; for (auto it = m_cacheContext->parts.begin(); it != m_cacheContext->parts.end(); ) { if (m_snapshot->parts.find(it->first) == m_snapshot->parts.end()) {