[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdesdk/umbrello/umbrello
From: Oliver Kellogg <okellogg () users ! sourceforge ! net>
Date: 2005-12-23 19:23:17
Message-ID: 1135365797.100319.31007.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 490938 by okellogg:
createUMLObject(): Create the full type including possible template params
in C++ syntax. Addresses
http://sourceforge.net/mailarchive/forum.php?thread_id=9298028&forum_id=460
M +7 -5 import_utils.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/import_utils.cpp #490937:490938
@@ -117,8 +117,9 @@
int isConst = name.contains(QRegExp("^const "));
name.remove(QRegExp("^const\\s+"));
QString typeName(name);
- int isPointer = typeName.contains('*');
- int isRef = typeName.contains('&');
+ const int isAdorned = typeName.contains( QRegExp("[^\\w: ]") );
+ const int isPointer = typeName.contains('*');
+ const int isRef = typeName.contains('&');
typeName.remove(QRegExp("[^\\w: ].*$"));
UMLObject *origType = umldoc->findUMLObject(typeName, Uml::ot_UMLObject, parentPkg);
if (origType == NULL) {
@@ -163,13 +164,13 @@
bPutAtGlobalScope = true;
}
Uml::Object_Type t = type;
- if (type == Uml::ot_UMLObject || isConst || isRef || isPointer)
+ if (type == Uml::ot_UMLObject || isAdorned)
t = Uml::ot_Class;
origType = umldoc->createUMLObject(t, typeName, parentPkg);
bNewUMLObjectWasCreated = true;
kapp->processEvents();
}
- if (isConst || isPointer || isRef) {
+ if (isConst || isAdorned) {
// Create the full given type (including adornments.)
if (isConst)
name.prepend("const ");
@@ -187,7 +188,8 @@
kdError() << "createUMLObject(" << name << "): "
<< "origType " << typeName << " is not a UMLClassifier"
<< endl;
- dt->setIsReference();
+ if (isRef || isPointer)
+ dt->setIsReference();
/*
if (isPointer) {
UMLObject *pointerDecl = umldoc->createUMLObject(Uml::ot_Datatype, type);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic