[Uml-devel] KDE/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Fri Jul 18 18:54:25 UTC 2008


SVN commit 834375 by okellogg:

Uml::setProgLangAction(): Remove the connect() hack. Do the connect outside.

 M  +18 -18    umbrelloui.rc  
 M  +21 -2     uml.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/umbrelloui.rc #834374:834375
@@ -55,24 +55,24 @@
     <Action name="generation_wizard"/>
     <Action name="generate_all"/>
     <Menu name="active_lang_menu"><text>Active &Language</text>
-      <Action name="set_lang_actionscript"/>
-      <Action name="set_lang_ada"/>
-      <Action name="set_lang_cpp"/>
-      <Action name="set_lang_csharp"/>
-      <Action name="set_lang_d"/>
-      <Action name="set_lang_idl"/>
-      <Action name="set_lang_java"/>
-      <Action name="set_lang_javascript"/>
-      <Action name="set_lang_mysql"/>
-      <Action name="set_lang_pascal"/>
-      <Action name="set_lang_perl"/>
-      <Action name="set_lang_php"/>
-      <Action name="set_lang_php5"/>
-      <Action name="set_lang_postgresql"/>
-      <Action name="set_lang_python"/>
-      <Action name="set_lang_ruby"/>
-      <Action name="set_lang_tcl"/>
-      <Action name="set_lang_xmlschema"/>
+      <Action name="setLang_actionscript"/>
+      <Action name="setLang_ada"/>
+      <Action name="setLang_cpp"/>
+      <Action name="setLang_csharp"/>
+      <Action name="setLang_d"/>
+      <Action name="setLang_idl"/>
+      <Action name="setLang_java"/>
+      <Action name="setLang_javascript"/>
+      <Action name="setLang_mysql"/>
+      <Action name="setLang_pascal"/>
+      <Action name="setLang_perl"/>
+      <Action name="setLang_php"/>
+      <Action name="setLang_php5"/>
+      <Action name="setLang_postgresql"/>
+      <Action name="setLang_python"/>
+      <Action name="setLang_ruby"/>
+      <Action name="setLang_tcl"/>
+      <Action name="setLang_xmlschema"/>
     </Menu>
     <Separator/>
     <Action name="create_default_datatypes"/>
--- trunk/KDE/kdesdk/umbrello/umbrello/uml.cpp #834374:834375
@@ -184,8 +184,6 @@
     m_langAct[pl] = actionCollection()->addAction(action);
     m_langAct[pl]->setText(name);
     m_langAct[pl]->setCheckable(true);
-    const char* method = QString('1' + action + "()").toAscii().constData();
-    connect(m_langAct[pl], SIGNAL(triggered()), this, method);
 }
 
 void UMLApp::initActions()
@@ -269,6 +267,27 @@
     setProgLangAction(Uml::pl_XMLSchema,    "XMLSchema",       "setLang_xmlschema");
     setProgLangAction(Uml::pl_Ocl,          "Ocl",             "setLang_ocl");
 
+    connect(m_langAct[Uml::pl_ActionScript], SIGNAL(triggered()), this, SLOT(setLang_actionscript()));
+    connect(m_langAct[Uml::pl_Ada],          SIGNAL(triggered()), this, SLOT(setLang_ada()));
+    connect(m_langAct[Uml::pl_Cpp],          SIGNAL(triggered()), this, SLOT(setLang_cpp()));
+    connect(m_langAct[Uml::pl_CSharp],       SIGNAL(triggered()), this, SLOT(setLang_csharp()));
+    connect(m_langAct[Uml::pl_D],            SIGNAL(triggered()), this, SLOT(setLang_d()));
+    connect(m_langAct[Uml::pl_IDL],          SIGNAL(triggered()), this, SLOT(setLang_idl()));
+    connect(m_langAct[Uml::pl_Java],         SIGNAL(triggered()), this, SLOT(setLang_java()));
+    connect(m_langAct[Uml::pl_JavaScript],   SIGNAL(triggered()), this, SLOT(setLang_javascript()));
+    connect(m_langAct[Uml::pl_MySQL],        SIGNAL(triggered()), this, SLOT(setLang_mysql()));
+    connect(m_langAct[Uml::pl_Pascal],       SIGNAL(triggered()), this, SLOT(setLang_pascal()));
+    connect(m_langAct[Uml::pl_Perl],         SIGNAL(triggered()), this, SLOT(setLang_perl()));
+    connect(m_langAct[Uml::pl_PHP],          SIGNAL(triggered()), this, SLOT(setLang_php()));
+    connect(m_langAct[Uml::pl_PHP5],         SIGNAL(triggered()), this, SLOT(setLang_php5()));
+    connect(m_langAct[Uml::pl_PostgreSQL],   SIGNAL(triggered()), this, SLOT(setLang_postgresql()));
+    connect(m_langAct[Uml::pl_Python],       SIGNAL(triggered()), this, SLOT(setLang_python()));
+    connect(m_langAct[Uml::pl_Ruby],         SIGNAL(triggered()), this, SLOT(setLang_ruby()));
+    connect(m_langAct[Uml::pl_SQL],          SIGNAL(triggered()), this, SLOT(setLang_sql()));
+    connect(m_langAct[Uml::pl_Tcl],          SIGNAL(triggered()), this, SLOT(setLang_tcl()));
+    connect(m_langAct[Uml::pl_XMLSchema],    SIGNAL(triggered()), this, SLOT(setLang_xmlschema()));
+    connect(m_langAct[Uml::pl_Ocl],          SIGNAL(triggered()), this, SLOT(setLang_ocl()));
+
     fileNew->setToolTip(i18n("Creates a new document"));
     fileOpen->setToolTip(i18n("Opens an existing document"));
     fileOpenRecent->setToolTip(i18n("Opens a recently used file"));




More information about the umbrello-devel mailing list