[Uml-devel] branches/work/soc-umbrello/umbrello/codeimport
Andi Fischer
andi.fischer at hispeed.ch
Sat May 1 17:00:25 UTC 2010
SVN commit 1121550 by fischer:
Sync with trunk.
M +6 -4 javaimport.cpp
--- branches/work/soc-umbrello/umbrello/codeimport/javaimport.cpp #1121549:1121550
@@ -67,6 +67,7 @@
QString JavaImport::joinTypename(const QString& typeName)
{
QString typeNameRet(typeName);
+ if (m_srcIndex + 1 < m_source.size()) {
if (m_source[m_srcIndex + 1] == "<" ||
m_source[m_srcIndex + 1] == "[") {
int start = ++m_srcIndex;
@@ -76,12 +77,11 @@
typeNameRet += m_source[i];
}
}
+ }
// to handle multidimensional arrays, call recursively
- if (m_srcIndex < m_source.count() - 1) {
- if (m_source[m_srcIndex + 1] == "[") {
+ if ((m_srcIndex + 1 < m_source.size()) && (m_source[m_srcIndex + 1] == "[")) {
typeNameRet = joinTypename( typeNameRet );
}
- }
return typeNameRet;
}
@@ -562,7 +562,10 @@
name += nextToken; // add possible array dimensions to `name'
}
nextToken = advance();
+ if (nextToken == QString()) {
+ break;
}
+ }
// try to resolve the class type, or create a placeholder if that fails
UMLObject *type = resolveClass( typeName );
UMLObject *o;
@@ -594,7 +597,6 @@
uError() << "index out of range: ignoring statement " << name;
skipStmt();
}
-
return true;
}
More information about the umbrello-devel
mailing list