aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-02-27 14:03:54 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-02-28 13:12:19 +0000
commit4392d46eb085fac19df059f42b84885d9a7ee617 (patch)
tree8997abd3aec21feec1f3456c3b6cf4ab9f2327c7
parent2bc6c255de159f28b782d1573be4776f193dfefa (diff)
shiboken6: Fix assert in AbstractMetaType::fromString()
The subsequent insert into the cache map invalidates the iterator, causing an assert. Flip the inserts. Amends c3ed21d824a337fec35a76b00440affe7e9841a1. Task-number: PYSIDE-2590 Change-Id: I747e343370b6a5aa355fc6890a8c71ebfe5066ff Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit aba4fef997d50788c506270d786075a3a308eff0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetatype.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
index 8a2a83c94..383b052be 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
+++ b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
@@ -968,9 +968,9 @@ AbstractMetaType::fromString(const QString &typeSignatureIn, QString *errorMessa
errorMessage->prepend(msgCannotBuildMetaType(typeSignature));
return {};
}
- it = cache.insert(typeSignature, metaType.value());
if (typeSignature != typeSignatureIn)
cache.insert(typeSignatureIn, metaType.value());
+ it = cache.insert(typeSignature, metaType.value());
}
return it.value();
}