[Uml-devel] branches/work/soc-umbrello/umbrello/widgets
Andi Fischer
andi.fischer at hispeed.ch
Wed Mar 2 19:36:21 UTC 2011
SVN commit 1223403 by fischer:
Some attributes changed to local variables. Tabs replaced witch spaces.
M +12 -8 messagewidget.cpp
M +0 -7 messagewidget.h
--- branches/work/soc-umbrello/umbrello/widgets/messagewidget.cpp #1223402:1223403
@@ -72,6 +72,8 @@
{
init();
setID(id);
+ m_objectWidgets[Uml::A] = new ObjectWidget(0);
+ m_objectWidgets[Uml::B] = new ObjectWidget(0);
m_sequenceMessageType = seqMsgType;
}
@@ -108,7 +110,8 @@
m_baseType = WidgetBase::wt_Message;
//:DEPRECATED: setIgnoreSnapToGrid(true);
//:DEPRECATED: setIgnoreSnapComponentSizeToGrid(true);
- m_objectWidgets[Uml::A] = m_objectWidgets[Uml::B] = 0;
+ m_objectWidgets[Uml::A] = 0;
+ m_objectWidgets[Uml::B] = 0;
Uml::TextRole tr = Uml::TextRole::Seq_Message;
m_floatingTextWidget = new FloatingTextWidget(tr);
@@ -339,7 +342,8 @@
*/
bool MessageWidget::hasObjectWidget(ObjectWidget * w) const
{
- return m_objectWidgets[Uml::A] == w || m_objectWidgets[Uml::B] == w;
+ return (m_objectWidgets[Uml::A] == w ||
+ m_objectWidgets[Uml::B] == w);
}
/**
@@ -529,12 +533,12 @@
m_clickedPoint.setY(qElement.attribute( "yclicked", "-1" ).toDouble());
}
- m_widgetAId = STR2ID(widgetaid);
- m_widgetBId = STR2ID(widgetbid);
- m_textId = STR2ID(textid);
+ Uml::IDType widgetAId = STR2ID(widgetaid);
+ Uml::IDType widgetBId = STR2ID(widgetbid);
+ Uml::IDType textId = STR2ID(textid);
Uml::TextRole tr = Uml::TextRole::Seq_Message;
- if (m_widgetAId == m_widgetBId)
+ if (widgetAId == widgetBId)
tr = Uml::TextRole::Seq_Message_Self;
//now load child elements
@@ -543,7 +547,7 @@
if ( !element.isNull() ) {
QString tag = element.tagName();
if (tag == "floatingtext") {
- m_floatingTextWidget = new FloatingTextWidget( tr, m_textId );
+ m_floatingTextWidget = new FloatingTextWidget( tr, textId );
m_floatingTextWidget->setText(operationText(umlScene()));
if( ! m_floatingTextWidget->loadFromXMI(element) ) {
// Most likely cause: The FloatingTextWidget is empty.
@@ -551,7 +555,7 @@
m_floatingTextWidget = NULL;
}
} else {
- uError() << "unknown tag " << tag << endl;
+ uError() << "unknown tag " << tag;
}
}
return true;
--- branches/work/soc-umbrello/umbrello/widgets/messagewidget.h #1223402:1223403
@@ -171,13 +171,6 @@
/// Whether the message is synchronous or asynchronous
Uml::Sequence_Message_Type m_sequenceMessageType;
- /**
- * The following variables are used by loadFromXMI() as an intermediate
- * store. activate() resolves the IDs, i.e. after activate() the variables
- * m_objectWidgets[] and m_floatingTextWidget can be used.
- */
- Uml::IDType m_widgetAId, m_widgetBId, m_textId;
-
public Q_SLOTS:
void slotMenuSelection(QAction* action);
More information about the umbrello-devel
mailing list