[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Thu Nov 18 11:54:05 UTC 2004


CVS commit by okellogg: 

Finalize the repair of 93298.


  M +9 -6      classimport.cpp   1.51


--- kdesdk/umbrello/umbrello/classimport.cpp  #1.50:1.51
@@ -91,8 +91,9 @@ UMLObject *ClassImport::createUMLObject(
                                         QString scopeName = components.front();
                                         components.pop_front();
-                                        int wantClass = KMessageBox::questionYesNo(NULL,
-                                                i18n("Treat the scope %1 as a class? (Select No for package)").arg(scopeName),
-                                                i18n("C++ import requests your help"));
-                                        Uml::Object_Type ot = (wantClass == KMessageBox::Yes ? Uml::ot_Class : Uml::ot_Package);
+                                        int wantNamespace = KMessageBox::questionYesNo(NULL,
+                                                i18n("Is the scope %1 a namespace or a class?").arg(scopeName),
+                                                i18n("C++ import requests your help"),
+                                                i18n("namespace"), i18n("class"));
+                                        Uml::Object_Type ot = (wantNamespace == KMessageBox::Yes ? Uml::ot_Package : Uml::ot_Class);
                                         o = m_umldoc->createUMLObject(ot, scopeName, parentPkg);
                                         parentPkg = dynamic_cast<UMLPackage*>(o);  //static_cast?
@@ -192,6 +193,8 @@ void ClassImport::insertMethod(UMLClass 
                                          QString comment /* = "" */) {
         op->setScope(scope);
+        if (!type.isEmpty()) {
         UMLObject *typeObj = createUMLObject(Uml::ot_UMLObject, type);
         op->setType(dynamic_cast<UMLClassifier*>(typeObj));
+        }
         op->setStatic(isStatic);
         op->setAbstract(isAbstract);






More information about the umbrello-devel mailing list