| Summary: | [C++ import] Type std::string is created multiple times | ||
|---|---|---|---|
| Product: | [Applications] umbrello | Reporter: | Oliver Kellogg <okellogg> |
| Component: | importer | Assignee: | Umbrello Development Group <umbrello-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | Git | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/sdk/umbrello/commit/7760dfff825a2a4643f6c7ea2f9d0f60e83969bf | Version Fixed/Implemented In: | 2.33.80 (KDE releases 22.03.80) |
| Sentry Crash Report: | |||
| Attachments: | umbrello_multiple_std-string_instances screenshot provided by Robert Hairgrove | ||
|
Description
Oliver Kellogg
2022-02-14 06:35:39 UTC
Created attachment 146699 [details]
umbrello_multiple_std-string_instances screenshot provided by Robert Hairgrove
Git commit 7760dfff825a2a4643f6c7ea2f9d0f60e83969bf by Oliver Kellogg.
Committed on 14/02/2022 at 08:30.
Pushed by okellogg into branch 'master'.
Fix "[C++ import] Type std::string is created multiple times"
umbrello/codeimport/import_utils.{h,cpp}
- New function checkStdString takes a writable reference to QString
as argument. If the variable passed in contains "std::string" it will
be changed to "string".
umbrello/codeimport/import_utils.cpp
- In function createUMLObject :
- Before attempting to find the UMLObject by name call
checkStdString(name).
- In the code handling nullptr return from first search,
- remove `const' on definition of local isConst;
- search `name' for "const" delimited at start and end by word
boundary and remove the possible matched item;
- apply checkStdString(typeName) before attempting to find the
UMLObject by typeName;
- before calling Object_Factory::createUMLObject fix condition for
changing `t' from ot_UMLObject to ot_Class.
- As a peripheral change, near start of function,
- simplify handling of leading "::" in name;
- handle Ada specific name prefix "Standard".
- At function addMethodParameter remove obsolete documentation.
FIXED-IN:2.33.80 (KDE releases 22.03.80)
M +39 -14 umbrello/codeimport/import_utils.cpp
M +2 -0 umbrello/codeimport/import_utils.h
https://invent.kde.org/sdk/umbrello/commit/7760dfff825a2a4643f6c7ea2f9d0f60e83969bf
|