[Uml-devel] branches/work/soc-umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Sun Feb 27 21:31:02 UTC 2011
SVN commit 1222978 by fischer:
toString function added.
M +8 -4 listpopupmenu.cpp
M +2 -0 listpopupmenu.h
--- branches/work/soc-umbrello/umbrello/listpopupmenu.cpp #1222977:1222978
@@ -672,7 +672,7 @@
m_actions[m] = addAction(Icon_Utils::SmallIcon(Icon_Utils::it_Export_Picture), i18n("Export as Picture..."));
break;
default:
- uWarning() << "called on unimplemented Menu_Type " << QLatin1String(ENUM_NAME(ListPopupMenu, Menu_Type, m));
+ uWarning() << "called on unimplemented Menu_Type " << toString(m);
break;
}
}
@@ -750,7 +750,7 @@
m_actions[m] = menu->addAction(Icon_Utils::SmallIcon(Icon_Utils::it_Text), i18n("Text Line..." ));
break;
default:
- uWarning() << "called on unimplemented Menu_Type " << QLatin1String(ENUM_NAME(ListPopupMenu, Menu_Type, m));
+ uWarning() << "called on unimplemented Menu_Type " << toString(m);
break;
}
}
@@ -1818,7 +1818,7 @@
action->setChecked(value);
#ifdef VERBOSE_DEBUGGING
else
- uWarning() << "called on unknown Menu_Type " << QLatin1String(ENUM_NAME(ListPopupMenu, Menu_Type, idx));
+ uWarning() << "called on unknown Menu_Type " << toString(idx);
#endif
}
@@ -1835,7 +1835,7 @@
action->setEnabled(value);
#ifdef VERBOSE_DEBUGGING
else
- uWarning() << "called on unknown Menu_Type " << QLatin1String(ENUM_NAME(ListPopupMenu, Menu_Type, idx));
+ uWarning() << "called on unknown Menu_Type " << toString(idx);
#endif
}
@@ -1855,3 +1855,7 @@
}
+QString ListPopupMenu::toString(Menu_Type menu)
+{
+ return QLatin1String(ENUM_NAME(ListPopupMenu, Menu_Type, menu));
+}
--- branches/work/soc-umbrello/umbrello/listpopupmenu.h #1222977:1222978
@@ -214,6 +214,8 @@
mt_Undefined = - 1
};
+ static QString toString(Menu_Type menu);
+
explicit ListPopupMenu(QWidget* parent, Menu_Type type = mt_Undefined, UMLView* view = 0);
explicit ListPopupMenu(QWidget* parent, Menu_Type type, WidgetBase *widget);
ListPopupMenu(QWidget* parent, UMLListViewItem::ListViewType type, UMLObject* object);
More information about the umbrello-devel
mailing list