[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Thu Nov 18 15:29:01 UTC 2004
CVS commit by okellogg:
Wow, this 93298 beast is still alive. More to come...
M +18 -11 classimport.cpp 1.52
--- kdesdk/umbrello/umbrello/classimport.cpp #1.51:1.52
@@ -8,5 +8,13 @@
***************************************************************************/
+// own header
#include "classimport.h"
+// qt/kde includes
+#include <qregexp.h>
+#include <kapplication.h>
+#include <kmessagebox.h>
+#include <kdebug.h>
+#include <klocale.h>
+// app includes
#include "uml.h"
#include "umldoc.h"
@@ -23,8 +31,4 @@
#include "classparser/driver.h"
#include "classparser/cpptree2uml.h"
-#include <kmessagebox.h>
-#include <kdebug.h>
-#include <klocale.h>
-#include <qregexp.h>
class CppDriver : public Driver {
@@ -213,14 +217,16 @@ UMLAttribute* ClassImport::addMethodPara
QString initialValue, QString doc,
Uml::Parameter_Direction kind) {
- // We don't necessarily expose the full declaration of UMLOperation
- // to clients of ClassImport. I.e. if clients only see a pointer
- // to the forward declaration of UMLOperation, they can't call any
- // methods on that pointer.
- // That's the raison d'etre for these thin wrappers.
- return method->addParm(type, name, initialValue, doc, kind);
+ UMLObject *typeObj = createUMLObject(Uml::ot_UMLObject, type);
+ UMLAttribute *attr = new UMLAttribute(method);
+ attr->setName(name);
+ attr->setType(dynamic_cast<UMLClassifier*>(typeObj));
+ attr->setInitialValue(initialValue);
+ attr->setDoc(doc);
+ attr->setParmKind(kind);
+ method->addParm(attr);
+ return attr;
}
void ClassImport::addEnumLiteral(UMLEnum *enumType, const QString &literal) {
- // Why an extra wrapper? See comment at addMethodParameter()
enumType->addEnumLiteral( literal );
}
@@ -263,4 +269,5 @@ void ClassImport::importCPP(QStringList
QString fileName = (*fileIT);
m_umldoc->writeToStatusBar(i18n("Importing file: %1").arg(fileName));
+ kapp->processEvents();
m_driver->parseFile( fileName );
TranslationUnitAST *ast = m_driver->translationUnit( fileName );
More information about the umbrello-devel
mailing list