Bug 115991 - Umbrello doesnt allow some keywords for return types
Summary: Umbrello doesnt allow some keywords for return types
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 1.4.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Oliver Kellogg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-09 12:25 UTC by Nuno Lopes
Modified: 2006-02-13 23:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nuno Lopes 2005-11-09 12:25:27 UTC
Version:           1.4.2 (using KDE KDE 3.4.3)
Installed from:    Gentoo Packages
Compiler:          gcc 3.4.4 
OS:                Linux

Umbrello doesn't allow me to set the return type of methods to 'boolean' (and some others), although it allows me to add boolean properties.

I need to use the boolean type because I'm programming in Java.
Comment 1 Nuno Lopes 2005-11-13 00:13:31 UTC
After some testing, the problem just happens when I don't have the return value in the list of possible types, and boolean wasn't.
Anyway I think it should add them to the list automaitcally.
Comment 2 Oliver Kellogg 2006-02-13 23:04:03 UTC
SVN commit 509191 by okellogg:

defaultDatatypes(): New. Override method from CodeGenerator.
BUG:115991


 M  +1 -0      ChangeLog  
 M  +14 -0     umbrello/codegenerators/javawriter.cpp  
 M  +5 -0      umbrello/codegenerators/javawriter.h  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #509190:509191
@@ -5,6 +5,7 @@
 * fixed problem with font size computation/word wrap in note widgets
   http://sourceforge.net/mailarchive/forum.php?thread_id=9558795&forum_id=472
 * Bugs/wishes from http://bugs.kde.org:
+* Umbrello doesnt allow some keywords for return types (115991)
 * Multiplicity labels positioned incorrectly when moving entities (120598)
 * Types of entity's attributes are displayed instead of their names (120742)
 * Unable to delete entity from entity list in "UML Model" frame (120750)
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/javawriter.cpp #509190:509191
@@ -649,6 +649,20 @@
     return string;
 }
 
+QStringList JavaWriter::defaultDatatypes() {
+    QStringList l;
+    l.append("int");
+    l.append("char");
+    l.append("boolean");
+    l.append("float");
+    l.append("double");
+    l.append("byte");
+    l.append("short");
+    l.append("long");
+    l.append("String");
+    return l;
+}
+
 void JavaWriter::writeOperations(UMLClassifier *c, QTextStream &java) {
     UMLOperationList opl;
     UMLOperationList oppub,opprot,oppriv;
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/javawriter.h #509190:509191
@@ -57,6 +57,11 @@
      */
     virtual Uml::Programming_Language getLanguage();
 
+    /**
+     * Overrides method from class CodeGenerator
+     */
+    QStringList defaultDatatypes();
+
 private:
 
     /**