[Uml-devel] KDE/kdesdk/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Feb 26 14:44:04 UTC 2006
SVN commit 513930 by okellogg:
apply commit 513929 from branches/KDE/3.5
M +2 -1 THANKS
M +8 -1 umbrello/classparser/cpptree2uml.cpp
M +7 -0 umbrello/import_utils.cpp
M +5 -0 umbrello/import_utils.h
M +1 -1 umbrello/umlview.cpp
--- trunk/KDE/kdesdk/umbrello/THANKS #513929:513930
@@ -36,7 +36,7 @@
Michel Hermier <michel.hermier @wanadoo.fr>
Paul Hensgen <phensgen @bigpond.net.au>
David Hugh-Jones <hughjonesd @yahoo.co.uk>
-Pekka Jääskeläinen <pjaaskel @cs.tut.fi>
+Pekka Jääskeläinen <pjaaskel @cs.tut.fi>
Klas Kalass <klas.kalass @gmx.de>
Oliver Kellogg <okellogg @users.sourceforge.net>
Tobias Koenig <tokoe @kde.org>
@@ -47,6 +47,7 @@
martin <mv123q3 @hotmail.com>
Rene Meyer <Rene.Meyer @sturmit.de>
Laurent Montel <montel @kde.org>
+Yan Morin <yansanmo.site @gmail.com>
Tom Morris <tfmorris @gmail.com>
Lutz Mueller <lutz.mueller @gmx.de>
Heiko Nardmann <heiko.nardmann @onlinehome.de>
--- trunk/KDE/kdesdk/umbrello/umbrello/classparser/cpptree2uml.cpp #513929:513930
@@ -146,7 +146,14 @@
//#endif
/* @todo Trace typedefs back to their root type for deciding
whether to build a Datatype (for pointers.) */
- if (type.contains('*')) {
+ /* check out if the ID type is a Datatype
+ ex: typedef unsigned int uint;
+ where unsigned int is a known datatype
+ I'm not sure if setIsReference() should be run
+ */
+ bool isDatatype = Import_Utils::isDatatype(typeId, m_currentNamespace[m_nsCnt]);
+
+ if (type.contains('*') || isDatatype) {
UMLObject *inner =
Import_Utils::createUMLObject( Uml::ot_Class, typeId,
m_currentNamespace[m_nsCnt] );
--- trunk/KDE/kdesdk/umbrello/umbrello/import_utils.cpp #513929:513930
@@ -349,5 +349,12 @@
incPathList.append(path);
}
+
+bool isDatatype(QString name, UMLPackage *parentPkg) {
+ UMLDoc *umldoc = UMLApp::app()->getDocument();
+ UMLObject * o = umldoc->findUMLObject(name, Uml::ot_Datatype, parentPkg);
+ return (o!=NULL);
+}
+
} // end namespace Import_Utils
--- trunk/KDE/kdesdk/umbrello/umbrello/import_utils.h #513929:513930
@@ -134,6 +134,11 @@
*/
bool newUMLObjectWasCreated();
+ /**
+ * Returns true if a type is an actual Datatype
+ */
+ bool isDatatype(QString name, UMLPackage *parentPkg = NULL);
+
} // end namespace Import_Utils
#endif
--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.cpp #513929:513930
@@ -705,7 +705,7 @@
return;
}
m_bCreateObject = true;
- m_Pos = e->pos();
+ m_Pos = (e->pos() * 100 ) / m_nZoom;
slotObjectCreated(o);
More information about the umbrello-devel
mailing list