Bug 133597 - Strange behavior with datatypes in french
Summary: Strange behavior with datatypes in french
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-05 17:44 UTC by Xavier Guerrin
Modified: 2006-09-08 05:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Guerrin 2006-09-05 17:44:52 UTC
Version:           1.5.5 (using KDE KDE 3.5.4)
Installed from:    Debian testing/unstable Packages
OS:                Linux

There seems to be a problem with datatypes in the french version of Umbrello. For example, Umbrello adds a new class named « Type de données::int » in the logical view instead of using the datatype "int". I guess it comes from the spaces in the translated string "Type de données".

How to reproduce :
-Create a new class.
-Add an attribute with the type « Types de données::int »
-Validate : a class « Types de données::int » appears in the logical view

More :
-right click on the class
-click on "Propriétés"
-select attributes
-select the attribute
-click on "Propriétés"
-the dialog displays the type "Vue logique::Types de données::int"
-of course, validating the dialog creates a new class named « Vue logique::Types de données::int »

Screenshots :
No problem with English version : http://katecoder.free.fr/img/umbrello-bug-en.png
The bug with French version : http://katecoder.free.fr/img/umbrello-bug-fr.png
Comment 1 Oliver Kellogg 2006-09-08 05:45:54 UTC
SVN commit 581960 by okellogg:

findUMLObject(): Remove ancient special processing for data types.
BUG:133597


 M  +4 -20     model_utils.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/model_utils.cpp #581959:581960
@@ -115,28 +115,12 @@
             name.remove("&");
     }
 #endif
-    if (type != Uml::ot_Datatype) {
-        if (name.contains("::"))
-            components = QStringList::split("::", name);
-        else if (name.contains("."))
-            components = QStringList::split(".", name);
-    }
     QString nameWithoutFirstPrefix;
+    if (name.contains("::"))
+        components = QStringList::split("::", name);
+    else if (name.contains("."))
+        components = QStringList::split(".", name);
     if (components.size() > 1) {
-        if (name.contains(QRegExp("[^\\w:\\.]"))) {
-            // It's obviously a datatype.
-            // Scope qualified datatypes live in the global scope.
-            for (UMLObjectListIt oit(inList); oit.current(); ++oit) {
-                UMLObject *obj = oit.current();
-                if (caseSensitive) {
-                    if (obj->getName() == name)
-                        return obj;
-                } else if (obj->getName().lower() == name.lower()) {
-                    return obj;
-                }
-            }
-            return NULL;
-        }
         name = components.front();
         components.pop_front();
         nameWithoutFirstPrefix = components.join("::");