SVN commit 1277224 by fischer: Coding style guide applied. M +20 -9 actor.cpp M +4 -10 actor.h --- trunk/KDE/kdesdk/umbrello/umbrello/actor.cpp #1277223:1277224 @@ -4,7 +4,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * copyright (C) 2002-2011 * + * copyright (C) 2002-2012 * * Umbrello UML Modeller Authors * ***************************************************************************/ @@ -16,23 +16,32 @@ * @param name The name of the Actor. * @param id The unique id to assign to this Actor. */ -UMLActor::UMLActor(const QString & name, Uml::IDType id) : UMLCanvasObject(name, id) { +UMLActor::UMLActor(const QString & name, Uml::IDType id) + : UMLCanvasObject(name, id) +{ init(); } -UMLActor::~UMLActor() {} +/** + * Standard destructor. + */ +UMLActor::~UMLActor() +{ +} /** * Initializes key variables of the class. */ -void UMLActor::init() { +void UMLActor::init() +{ m_BaseType = UMLObject::ot_Actor; } /** * Make a clone of this object. */ -UMLObject* UMLActor::clone() const { +UMLObject* UMLActor::clone() const +{ UMLActor *clone = new UMLActor(); UMLObject::copyInto(clone); return clone; @@ -41,17 +50,19 @@ /** * Creates the XMI element. */ -void UMLActor::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) { +void UMLActor::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) +{ QDomElement actorElement = UMLObject::save("UML:Actor", qDoc); qElement.appendChild(actorElement); } /** - * Loads the XMI element (empty.) + * Loads the XMI element (empty). */ -bool UMLActor::load(QDomElement&) { +bool UMLActor::load(QDomElement& element) +{ + Q_UNUSED(element); return true; } - #include "actor.moc" --- trunk/KDE/kdesdk/umbrello/umbrello/actor.h #1277223:1277224 @@ -1,11 +1,10 @@ /*************************************************************************** - * * * 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) 2002-2006 * + * copyright (C) 2002-2012 * * Umbrello UML Modeller Authors * ***************************************************************************/ @@ -25,17 +24,13 @@ * @see UMLCanvasObject * Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org */ -class UMLActor : public UMLCanvasObject { +class UMLActor : public UMLCanvasObject +{ Q_OBJECT public: - explicit UMLActor(const QString & name = QString(), Uml::IDType id = Uml::id_None); + virtual ~UMLActor(); - /** - * Standard deconstructor. - */ - ~UMLActor(); - virtual void init(); virtual UMLObject* clone() const; @@ -43,7 +38,6 @@ void saveToXMI( QDomDocument & qDoc, QDomElement & qElement ); protected: - bool load( QDomElement & element ); };