[Uml-devel] KDE/kdesdk/umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Sat Sep 24 10:10:11 UTC 2011
SVN commit 1255284 by fischer:
Krazy issues 3 (copyright) fixed, unneeded includes removed and some formatting changed.
M +19 -13 codeaccessormethod.cpp
M +1 -13 codeaccessormethod.h
M +3 -4 codeviewerstate.h
--- trunk/KDE/kdesdk/umbrello/umbrello/codeaccessormethod.cpp #1255283:1255284
@@ -4,7 +4,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2003 thomas *
+ * copyright (C) 2003 Brian Thomas <thomas at mail630.gsfc.nasa.gov> *
* copyright (C) 2004-2011 *
* Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
@@ -15,18 +15,20 @@
// qt/kde includes
// local includes
-#include "classifiercodedocument.h"
#include "codeclassfield.h"
-#include "attribute.h"
-#include "umlobject.h"
-#include "umlrole.h"
+/**
+ * Constructors
+ */
CodeAccessorMethod::CodeAccessorMethod ( CodeClassField * parentCF )
: CodeMethodBlock ( parentCF->getParentDocument(), parentCF->getParentObject() )
{
initFields(parentCF);
}
+/**
+ * Empty Destructor
+ */
CodeAccessorMethod::~CodeAccessorMethod ( )
{
}
@@ -72,20 +74,25 @@
m_accessorType = atype;
}
-// this type of textblock is special
-// we DON'T release it when resetTextBlocks is
-// called because we re-use it over and over
-// until the codeclassfield is released.
+/**
+ * This type of textblock is special
+ * we DON'T release it when resetTextBlocks is
+ * called because we re-use it over and over
+ * until the codeclassfield is released.
+ */
void CodeAccessorMethod::release ()
{
// do nothing
}
-// ok, a method so the parent can force it to release
+/**
+ * A method so the parent code classfield can force code block to release.
+ */
void CodeAccessorMethod::forceRelease ()
{
- if(m_parentclassfield)
+ if (m_parentclassfield) {
m_parentclassfield->disconnect(this);
+ }
CodeMethodBlock::release();
}
@@ -165,8 +172,7 @@
CodeMethodBlock::setAttributesFromObject(obj);
CodeAccessorMethod * mb = dynamic_cast<CodeAccessorMethod*>(obj);
- if(mb)
- {
+ if (mb) {
m_parentclassfield->disconnect(this); // always disconnect
initFields(mb->getParentClassField());
--- trunk/KDE/kdesdk/umbrello/umbrello/codeaccessormethod.h #1255283:1255284
@@ -4,7 +4,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2003 thomas *
+ * copyright (C) 2003 Brian Thomas <thomas at mail630.gsfc.nasa.gov> *
* copyright (C) 2004-2011 *
* Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
@@ -31,14 +31,7 @@
// "LIST" is to retrive the entire list of items in a multiple-valued field
enum AccessorType {GET=0, SET, ADD, REMOVE, LIST};
- /**
- * Constructors
- */
CodeAccessorMethod ( CodeClassField * field );
-
- /**
- * Empty Destructor
- */
virtual ~CodeAccessorMethod ( );
CodeClassField * getParentClassField ( );
@@ -47,9 +40,6 @@
void setType ( AccessorType type);
- /**
- * Utility method to get the value of the parent object of the parent classifield.
- */
// virtual UMLObject * getParentObject();
bool parentIsAttribute();
@@ -57,7 +47,6 @@
virtual void updateContent() = 0;
virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
-
virtual void loadFromXMI ( QDomElement & root );
virtual void setAttributesFromObject (TextBlock * obj);
@@ -72,7 +61,6 @@
virtual void updateMethodDeclaration() = 0;
- // a method so the parent code classfield can force code block to release
void forceRelease ();
private:
--- trunk/KDE/kdesdk/umbrello/umbrello/codeviewerstate.h #1255283:1255284
@@ -1,19 +1,18 @@
/***************************************************************************
- * *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2004-2007 *
+ * copyright (C) 2004-2011 *
* Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
#ifndef CODEVIEWERSTATE_H
#define CODEVIEWERSTATE_H
-#include <qcolor.h>
-#include <qfont.h>
+#include <QtGui/QColor>
+#include <QtGui/QFont>
namespace Settings {
More information about the umbrello-devel
mailing list