Skip to content
Commit 7760dfff authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

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.

BUG: 450196
FIXED-IN:2.33.80 (KDE releases 22.03.80)
parent f234803d
Pipeline #137117 passed with stage
in 20 minutes and 7 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment