[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello/codeimport
Oliver Kellogg
okellogg at users.sourceforge.net
Wed Jan 10 19:51:27 UTC 2007
SVN commit 622124 by okellogg:
createUMLObject(): The namespace/class ambiguity is C++ specific.
M +8 -5 import_utils.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeimport/import_utils.cpp #622123:622124
@@ -5,8 +5,8 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2005-2006 *
- * Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
+ * copyright (C) 2005-2007 *
+ * Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
// own header
@@ -154,6 +154,7 @@
if (components.count() > 1) {
typeName = components.back();
components.pop_back();
+ Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage();
while ( components.count() ) {
QString scopeName = components.front();
components.pop_front();
@@ -163,12 +164,14 @@
continue;
}
int wantNamespace = KMessageBox::Yes;
- /* We know std and Qt are namespaces */
- if (scopeName != "std" && scopeName != "Qt") {
- wantNamespace = KMessageBox::questionYesNo(NULL,
+ if (pl == Uml::pl_Cpp) {
+ /* We know std and Qt are namespaces */
+ if (scopeName != "std" && scopeName != "Qt") {
+ 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 = Object_Factory::createUMLObject(ot, scopeName, parentPkg);
More information about the umbrello-devel
mailing list