[Uml-devel] branches/work/soc-umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Wed Oct 1 11:18:48 UTC 2008
SVN commit 866576 by fischer:
Porting r866575.
M +20 -15 umldoc.cpp
--- branches/work/soc-umbrello/umbrello/umldoc.cpp #866575:866576
@@ -118,7 +118,7 @@
i18n("Deployment View"),
i18n("Entity Relationship Model")
};
- for (int i = 0; i < Uml::N_MODELTYPES; i++) {
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
m_root[i] = new UMLFolder(nativeRootName[i], STR2ID(nativeRootName[i]));
m_root[i]->setLocalName(localizedRootName[i]);
}
@@ -324,8 +324,9 @@
// Remove all objects from the predefined folders.
// @fixme With advanced code generation enabled, this crashes.
- for (int i = 0; i < Uml::N_MODELTYPES; i++)
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
m_root[i]->removeAllObjects();
+ }
// Restore the datatype folder, it has been deleted above.
m_datatypeRoot = new UMLFolder("Datatypes", "Datatypes");
m_datatypeRoot->setLocalName(i18n("Datatypes"));
@@ -735,7 +736,7 @@
UMLView * UMLDoc::findView(Uml::IDType id)
{
UMLView *v = NULL;
- for (int i = 0; i < Uml::N_MODELTYPES; i++) {
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
v = m_root[i]->findView(id);
if (v)
break;
@@ -767,7 +768,7 @@
UMLObject* UMLDoc::findObjectById(Uml::IDType id)
{
UMLObject *o = NULL;
- for (int i = 0; i < Uml::N_MODELTYPES; i++) {
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
if (id == m_root[i]->getID())
return m_root[i];
o = m_root[i]->findObjectById(id);
@@ -810,7 +811,7 @@
UMLObject *o = m_datatypeRoot->findObject(name);
if (o)
return o;
- for (int i = 0; i < Uml::N_MODELTYPES; i++) {
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
UMLObjectList list = m_root[i]->containedObjects();
o = Model_Utils::findUMLObject(list, name, type, currentObj);
if (o)
@@ -1582,7 +1583,7 @@
stereoNames.append(stName);
}
}
- for (int i = 0; i < Uml::N_MODELTYPES; i++) {
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
m_root[i]->saveToXMI(doc, ownedNS);
}
@@ -1885,7 +1886,7 @@
return;
m_bTypesAreResolved = true;
writeToStatusBar( i18n("Resolving object references...") );
- for (int i = 0; i < Uml::N_MODELTYPES; i++) {
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
UMLFolder *obj = m_root[i];
#ifdef VERBOSE_DEBUGGING
uDebug() << "UMLDoc: invoking resolveRef() for " << obj->getName()
@@ -1946,7 +1947,7 @@
if (tagEq(type, "Model")) {
bool foundUmbrelloRootFolder = false;
QString name = tempElement.attribute("name");
- for (int i = 0; i < Uml::N_MODELTYPES; i++) {
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
if (name == m_root[i]->getName()) {
m_pCurrentRoot = m_root[i];
m_root[i]->loadFromXMI(tempElement);
@@ -2166,8 +2167,9 @@
*/
void UMLDoc::removeAllViews()
{
- for (int i = 0; i < Uml::N_MODELTYPES; i++)
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
m_root[i]->removeAllViews();
+ }
UMLApp::app()->setCurrentView(NULL);
emit sigDiagramChanged(dt_Undefined);
@@ -2243,7 +2245,7 @@
UMLAssociationList UMLDoc::getAssociations()
{
UMLAssociationList associationList;
- for (int i = 0; i < Uml::N_MODELTYPES; i++) {
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
UMLAssociationList assocs = m_root[i]->getAssociations();
foreach (UMLAssociation* a, assocs )
@@ -2262,7 +2264,7 @@
UMLView * printView = 0;
int count = selectPage->printUmlCount();
QPainter painter(pPrinter);
- for(int i = 0;i < count;i++) {
+ for(int i = 0; i < count; ++i) {
if(i>0)
pPrinter->newPage();
QString sID = selectPage->printUmlDiagram(i);
@@ -2284,8 +2286,9 @@
UMLViewList UMLDoc::getViewIterator()
{
UMLViewList accumulator;
- for (int i = 0; i < Uml::N_MODELTYPES; i++)
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
m_root[i]->appendViews(accumulator, true);
+ }
return accumulator;
}
@@ -2363,7 +2366,7 @@
*/
Uml::Model_Type UMLDoc::rootFolderType(UMLObject *obj)
{
- for (int i = 0; i < Uml::N_MODELTYPES; i++) {
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
const Uml::Model_Type m = (Uml::Model_Type)i;
if (obj == m_root[m])
return m;
@@ -2451,8 +2454,9 @@
bool m_bLoading_old = m_bLoading;
m_bLoading = true; //this is to prevent document becoming modified when activating a view
- for (int i = 0; i < Uml::N_MODELTYPES; i++)
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
m_root[i]->activateViews();
+ }
m_bLoading = m_bLoading_old;
}
@@ -2461,8 +2465,9 @@
*/
void UMLDoc::settingsChanged(Settings::OptionState optionState)
{
- for (int i = 0; i < Uml::N_MODELTYPES; i++)
+ for (int i = 0; i < Uml::N_MODELTYPES; ++i) {
m_root[i]->setViewOptions(optionState);
+ }
initSaveTimer();
}
More information about the umbrello-devel
mailing list