[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Mar 25 06:02:09 UTC 2007
SVN commit 646255 by okellogg:
CodeClassField::getMethodList(): Return by value.
M +5 -4 classifiercodedocument.cpp
M +6 -6 codeclassfield.cpp
M +1 -1 codeclassfield.h
M +3 -2 hierarchicalcodeblock.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifiercodedocument.cpp #646254:646255
@@ -318,8 +318,9 @@
for (CodeClassFieldListIt ccflit(list); ccflit.current(); ++ccflit)
{
CodeClassField * field = ccflit.current();
- CodeAccessorMethodList * list = field->getMethodList();
- for (CodeAccessorMethod * method = list->first(); method; method = list->next())
+ CodeAccessorMethodList list = field->getMethodList();
+ CodeAccessorMethod * method;
+ for (CodeAccessorMethodListIt it(list); (method = it.current()) != NULL; ++it)
{
/*
QString tag = method->getTag();
@@ -721,9 +722,9 @@
if(decl && decl->getTag() == tag)
return decl;
// well, if not in the decl block, then in the methods perhaps?
- CodeAccessorMethodList * mlist = cf->getMethodList();
+ CodeAccessorMethodList mlist = cf->getMethodList();
CodeAccessorMethod *m;
- for(CodeAccessorMethodListIt it(*mlist); (m = it.current()) != NULL; ++it)
+ for (CodeAccessorMethodListIt it(mlist); (m = it.current()) != NULL; ++it)
if(m->getTag() == tag)
return m;
}
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeclassfield.cpp #646254:646255
@@ -197,8 +197,8 @@
* @return QPtrList<CodeMethodBlock *> list of Method objects held by
* m_methodVector
*/
-CodeAccessorMethodList * CodeClassField::getMethodList ( ) {
- return &m_methodVector;
+CodeAccessorMethodList CodeClassField::getMethodList() {
+ return m_methodVector;
}
/** determine if we will *allow* methods to be viewable.
@@ -254,8 +254,8 @@
m_declCodeBlock->saveToXMI(doc, cfElem);
// now record the tags on our accessormethods
- CodeAccessorMethodList * list = getMethodList ( );
- for(CodeAccessorMethod * method=list->first(); method; method=list->next())
+ CodeAccessorMethod *method;
+ for (CodeAccessorMethodListIt it(m_methodVector); (method = it.current()) != NULL; ++it)
{
method->saveToXMI(doc,cfElem);
}
@@ -378,8 +378,8 @@
void CodeClassField::synchronize ()
{
updateContent();
- CodeAccessorMethodList * list = getMethodList();
- for(CodeAccessorMethod * method=list->first(); method; method=list->next())
+ CodeAccessorMethod *method;
+ for (CodeAccessorMethodListIt it(m_methodVector); (method = it.current()) != NULL; ++it)
method->syncToParent();
if(m_declCodeBlock)
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeclassfield.h #646254:646255
@@ -85,7 +85,7 @@
* @return CodeAccessorMethodList list of Method objects held by
* m_methodVector
*/
- CodeAccessorMethodList * getMethodList ( );
+ CodeAccessorMethodList getMethodList();
/** Utility method to allow finding particular accessor method of this
* code class field by its type identifier.
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/hierarchicalcodeblock.cpp #646254:646255
@@ -213,8 +213,9 @@
for (CodeClassFieldListIt ccflit(list); ccflit.current(); ++ccflit)
{
CodeClassField * field = ccflit.current();
- CodeAccessorMethodList * list = field->getMethodList();
- for (CodeAccessorMethod * method = list->first(); method; method = list->next())
+ CodeAccessorMethodList list = field->getMethodList();
+ CodeAccessorMethod * method;
+ for (CodeAccessorMethodListIt it(list); (method = it.current()) != NULL; ++it)
{
QString tag = method->getTag();
if(tag.isEmpty())
More information about the umbrello-devel
mailing list