[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Tue May 16 22:46:02 UTC 2006
SVN commit 541720 by okellogg:
initFields(): Parameterize.
M +7 -10 codeblockwithcomments.cpp
M +1 -1 codeblockwithcomments.h
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeblockwithcomments.cpp #541719:541720
@@ -25,19 +25,13 @@
CodeBlockWithComments::CodeBlockWithComments ( HierarchicalCodeBlock * hb, const QString & body, const QString & comment)
: CodeBlock (hb, body)
{
- initFields();
- CodeComment * codecomment = CodeGenFactory::newCodeComment(hb->getParentDocument());
- codecomment->setText(comment);
- setComment(codecomment);
+ initFields(hb->getParentDocument(), comment);
}
CodeBlockWithComments::CodeBlockWithComments ( CodeDocument * parent , const QString & body, const QString & comment)
: CodeBlock (parent, body)
{
- initFields();
- CodeComment * codecomment = CodeGenFactory::newCodeComment(parent);
- codecomment->setText(comment);
- setComment(codecomment);
+ initFields(parent, comment);
}
CodeBlockWithComments::~CodeBlockWithComments ( ) { }
@@ -171,8 +165,11 @@
m_comment->setIndentationLevel(level);
}
-void CodeBlockWithComments::initFields ( ) {
- m_comment = CodeGenFactory::newCodeComment(getParentDocument());
+void CodeBlockWithComments::initFields(CodeDocument *parent, QString comment)
+{
+ CodeComment * codecomment = CodeGenFactory::newCodeComment(parent);
+ codecomment->setText(comment);
+ m_comment = codecomment;
}
#include "codeblockwithcomments.moc"
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeblockwithcomments.h #541719:541720
@@ -100,7 +100,7 @@
CodeComment * m_comment;
- void initFields();
+ void initFields(CodeDocument *parent, QString comment);
};
More information about the umbrello-devel
mailing list