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

Oliver Kellogg okellogg at users.sourceforge.net
Sun Jan 8 05:36:03 UTC 2006


SVN commit 495520 by okellogg:

apply commit 495519 from branches/KDE/3.5

 M  +2 -13     uml.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/uml.cpp #495519:495520
@@ -49,10 +49,7 @@
 // app includes
 #include "aligntoolbar.h"
 #include "infowidget.h"
-#include "cppimport.h"
-#include "idlimport.h"
-#include "adaimport.h"
-#include "javaimport.h"
+#include "classimport.h"
 #include "docwindow.h"
 #include "codegenerator.h"
 #include "codegenerationpolicy.h"
@@ -1383,16 +1380,8 @@
     preselectedExtension.append("\n*|" + i18n("All Files"));
     QStringList fileList = KFileDialog::getOpenFileNames(":import-classes", preselectedExtension,
                            this, i18n("Select Code to Import") );
-    ClassImport *classImporter = NULL;
     const QString& firstFile = fileList.first();
-    if (firstFile.endsWith(".idl"))
-        classImporter = new IDLImport();
-    else if (firstFile.endsWith(".java"))
-        classImporter = new JavaImport();
-    else if (firstFile.contains( QRegExp("\\.ad[sba]$") ))
-        classImporter = new AdaImport();
-    else
-        classImporter = new CppImport();  // the default.
+    ClassImport *classImporter = ClassImport::createImporterByFileExt(firstFile);
     classImporter->importFiles(fileList);
     delete classImporter;
     m_doc->setLoading(false);




More information about the umbrello-devel mailing list