summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2016-11-04 07:07:38 (GMT)
committerRalf Habacker <ralf.habacker@freenet.de>2016-11-04 07:07:38 (GMT)
commit657d51ce0224c5fee9aa8ef840da42962445c5a9 (patch)
tree32a432d08c87a42b12e0ba2d41355b80cbc97864
parent87e34e1c8c20605fefb00ea170f341eecd1f192c (diff)
Use 0 instead of NULL to follow coding style.
-rw-r--r--umbrello/_unused/plugin.cpp2
-rw-r--r--umbrello/_unused/pluginloader.cpp10
-rw-r--r--umbrello/assocrules.cpp8
-rw-r--r--umbrello/clipboard/umlclipboard.cpp14
-rw-r--r--umbrello/clipboard/umldragdata.cpp6
-rw-r--r--umbrello/codegenerators/ada/adawriter.cpp16
-rw-r--r--umbrello/codegenerators/classifiercodedocument.cpp6
-rw-r--r--umbrello/codegenerators/codeclassfield.cpp6
-rw-r--r--umbrello/codegenerators/codeclassfielddeclarationblock.cpp2
-rw-r--r--umbrello/codegenerators/codedocument.cpp8
-rw-r--r--umbrello/codegenerators/codegenerator.cpp2
-rw-r--r--umbrello/codegenerators/codegenfactory.cpp18
-rw-r--r--umbrello/codegenerators/codegenobjectwithtextblocks.cpp10
-rw-r--r--umbrello/codegenerators/cpp/cppheadercodeaccessormethod.cpp4
-rw-r--r--umbrello/codegenerators/cpp/cppheadercodeclassfielddeclarationblock.cpp4
-rw-r--r--umbrello/codegenerators/cpp/cppheadercodedocument.cpp16
-rw-r--r--umbrello/codegenerators/cpp/cppsourcecodeaccessormethod.cpp8
-rw-r--r--umbrello/codegenerators/cpp/cppsourcecodeclassfielddeclarationblock.cpp2
-rw-r--r--umbrello/codegenerators/cpp/cppwriter.cpp2
-rw-r--r--umbrello/codegenerators/csharp/csharpwriter.cpp4
-rw-r--r--umbrello/codegenerators/d/dclassifiercodedocument.cpp2
-rw-r--r--umbrello/codegenerators/d/dcodeaccessormethod.cpp2
-rw-r--r--umbrello/codegenerators/d/dcodeclassfielddeclarationblock.cpp2
-rw-r--r--umbrello/codegenerators/d/dwriter.cpp2
-rw-r--r--umbrello/codegenerators/hierarchicalcodeblock.cpp2
-rw-r--r--umbrello/codegenerators/java/javaclassifiercodedocument.cpp6
-rw-r--r--umbrello/codegenerators/java/javacodeclassfielddeclarationblock.cpp2
-rw-r--r--umbrello/codegenerators/java/javacodeoperation.cpp2
-rw-r--r--umbrello/codegenerators/java/javawriter.cpp2
-rw-r--r--umbrello/codegenerators/pascal/pascalwriter.cpp8
-rw-r--r--umbrello/codegenerators/php/php5writer.cpp4
-rw-r--r--umbrello/codegenerators/ruby/rubyclassifiercodedocument.cpp2
-rw-r--r--umbrello/codegenerators/ruby/rubycodeaccessormethod.cpp4
-rw-r--r--umbrello/codegenerators/ruby/rubycodeoperation.cpp2
-rw-r--r--umbrello/codegenerators/sql/mysqlwriter.cpp4
-rw-r--r--umbrello/codegenerators/sql/postgresqlwriter.cpp2
-rw-r--r--umbrello/codegenerators/tcl/tclwriter.cpp2
-rw-r--r--umbrello/codegenerators/vala/valawriter.cpp4
-rw-r--r--umbrello/codegenwizard/codegenselectpage.cpp2
-rw-r--r--umbrello/codegenwizard/codegenstatuspage.cpp2
-rw-r--r--umbrello/codeimport/adaimport.cpp18
-rw-r--r--umbrello/codeimport/csharp/csharpimport.cpp6
-rw-r--r--umbrello/codeimport/idlimport.cpp2
-rw-r--r--umbrello/codeimport/import_utils.cpp34
-rw-r--r--umbrello/codeimport/import_utils.h6
-rw-r--r--umbrello/codeimport/javaimport.cpp8
-rw-r--r--umbrello/codeimport/kdevcppparser/cpptree2uml.cpp22
-rw-r--r--umbrello/codeimport/nativeimportbase.cpp2
-rw-r--r--umbrello/codeimport/pascalimport.cpp10
-rw-r--r--umbrello/codeimport/pythonimport.cpp2
-rw-r--r--umbrello/dialogs/codeeditor.cpp2
-rw-r--r--umbrello/dialogs/dialog_utils.cpp4
-rw-r--r--umbrello/dialogs/pages/associationgeneralpage.cpp4
-rw-r--r--umbrello/dialogs/pages/associationrolepage.cpp8
-rw-r--r--umbrello/dialogs/pages/classifierlistpage.cpp16
-rw-r--r--umbrello/dialogs/pages/classoptionspage.cpp20
-rw-r--r--umbrello/dialogs/pages/constraintlistpage.cpp4
-rw-r--r--umbrello/dialogs/pages/packagecontentspage.cpp2
-rw-r--r--umbrello/dialogs/parameterpropertiesdialog.cpp2
-rw-r--r--umbrello/dialogs/umlforeignkeyconstraintdialog.cpp6
-rw-r--r--umbrello/dialogs/widgets/umldatatypewidget.cpp14
-rw-r--r--umbrello/dialogs/widgets/umlpackagewidget.cpp6
-rw-r--r--umbrello/docgenerators/docbook2xhtmlgeneratorjob.cpp4
-rw-r--r--umbrello/docgenerators/docbookgeneratorjob.cpp4
-rw-r--r--umbrello/docgenerators/main.cpp4
-rw-r--r--umbrello/import_rose.cpp20
-rw-r--r--umbrello/listpopupmenu.cpp12
-rw-r--r--umbrello/model_utils.cpp58
-rw-r--r--umbrello/object_factory.cpp18
-rw-r--r--umbrello/petaltree2uml.cpp52
-rw-r--r--umbrello/uml.cpp28
-rw-r--r--umbrello/umldoc.cpp6
-rw-r--r--umbrello/umlmodel/association.cpp30
-rw-r--r--umbrello/umlmodel/association.h2
-rw-r--r--umbrello/umlmodel/attribute.cpp16
-rw-r--r--umbrello/umlmodel/classifier.cpp54
-rw-r--r--umbrello/umlmodel/classifier.h6
-rw-r--r--umbrello/umlmodel/classifierlistitem.cpp8
-rw-r--r--umbrello/umlmodel/datatype.cpp2
-rw-r--r--umbrello/umlmodel/entity.cpp30
-rw-r--r--umbrello/umlmodel/entityattribute.cpp4
-rw-r--r--umbrello/umlmodel/enum.cpp10
-rw-r--r--umbrello/umlmodel/foreignkeyconstraint.cpp22
-rw-r--r--umbrello/umlmodel/operation.cpp8
-rw-r--r--umbrello/umlmodel/package.cpp16
-rw-r--r--umbrello/umlmodel/template.cpp4
-rw-r--r--umbrello/umlmodel/umlcanvasobject.cpp12
-rw-r--r--umbrello/umlmodel/umlobject.cpp18
-rw-r--r--umbrello/umlmodel/umlobjectlist.cpp2
-rw-r--r--umbrello/umlmodel/umlrole.h2
-rw-r--r--umbrello/umlmodel/uniqueconstraint.cpp10
-rw-r--r--umbrello/umlscene.cpp94
-rw-r--r--umbrello/umlwidgets/associationwidget.cpp132
-rw-r--r--umbrello/umlwidgets/associationwidget.h2
-rw-r--r--umbrello/umlwidgets/classifierwidget.cpp16
-rw-r--r--umbrello/umlwidgets/combinedfragmentwidget.cpp2
-rw-r--r--umbrello/umlwidgets/componentwidget.cpp2
-rw-r--r--umbrello/umlwidgets/floatingtextwidget.cpp6
-rw-r--r--umbrello/umlwidgets/linkwidget.cpp8
-rw-r--r--umbrello/umlwidgets/messagewidget.cpp42
-rw-r--r--umbrello/umlwidgets/nodewidget.cpp2
-rw-r--r--umbrello/umlwidgets/notewidget.cpp2
-rw-r--r--umbrello/umlwidgets/objectnodewidget.cpp2
-rw-r--r--umbrello/umlwidgets/packagewidget.cpp4
-rw-r--r--umbrello/umlwidgets/pinportbase.cpp24
-rw-r--r--umbrello/umlwidgets/portwidget.cpp2
-rw-r--r--umbrello/umlwidgets/signalwidget.cpp8
-rw-r--r--umbrello/umlwidgets/umlwidget.cpp8
-rw-r--r--umbrello/umlwidgets/widget_factory.cpp16
-rw-r--r--umbrello/umlwidgets/widget_utils.cpp2
-rw-r--r--umbrello/umlwidgets/widgetbase.cpp8
-rw-r--r--umbrello/worktoolbar.cpp2
112 files changed, 625 insertions, 625 deletions
diff --git a/umbrello/_unused/plugin.cpp b/umbrello/_unused/plugin.cpp
index 45378b8..2032447 100644
--- a/umbrello/_unused/plugin.cpp
+++ b/umbrello/_unused/plugin.cpp
@@ -35,7 +35,7 @@ Plugin::Plugin(QObject *parent,
Configurable(),
_ref(0),
_instanceName(name),
- _config(NULL)
+ _config(0)
{
}
diff --git a/umbrello/_unused/pluginloader.cpp b/umbrello/_unused/pluginloader.cpp
index c93b37d..b7e200d 100644
--- a/umbrello/_unused/pluginloader.cpp
+++ b/umbrello/_unused/pluginloader.cpp
@@ -29,7 +29,7 @@
using namespace Umbrello;
// static data
-PluginLoader *PluginLoader::_instance = NULL;
+PluginLoader *PluginLoader::_instance = 0;
PluginLoader::PluginLoader() :
_plugins(),
@@ -55,9 +55,9 @@ PluginLoader::instance()
Plugin *
PluginLoader::loadPlugin(const QString &name)
{
- KLibrary *lib = NULL;
- KLibFactory *factory = NULL;
- Plugin *plugin = NULL;
+ KLibrary *lib = 0;
+ KLibFactory *factory = 0;
+ Plugin *plugin = 0;
PluginMap::iterator it;
bool success = true;
@@ -130,7 +130,7 @@ PluginLoader::findPlugin(const QString &name)
PluginMap::iterator it = _plugins.find(name);
if(it != _plugins.end())
return it.value();
- return NULL;
+ return 0;
}
void
diff --git a/umbrello/assocrules.cpp b/umbrello/assocrules.cpp
index 650ee03..993e358 100644
--- a/umbrello/assocrules.cpp
+++ b/umbrello/assocrules.cpp
@@ -103,7 +103,7 @@ bool AssocRules::allowAssociation(Uml::AssociationType::Enum assocType, UMLWidge
case Uml::AssociationType::State:
{
StateWidget *pState = widget->asStateWidget();
- return (pState == NULL || pState->stateType() != StateWidget::End);
+ return (pState == 0 || pState->stateType() != StateWidget::End);
}
break;
@@ -111,7 +111,7 @@ bool AssocRules::allowAssociation(Uml::AssociationType::Enum assocType, UMLWidge
case Uml::AssociationType::Exception:
{
ActivityWidget *pActivity = widget->asActivityWidget();
- return (pActivity == NULL || pActivity->activityType() != ActivityWidget::End);
+ return (pActivity == 0 || pActivity->activityType() != ActivityWidget::End);
}
break;
@@ -277,11 +277,11 @@ bool AssocRules::allowAssociation(Uml::AssociationType::Enum assocType,
if ((actTypeB == ActivityWidget::End || actTypeB == ActivityWidget::Final) &&
actTypeA != ActivityWidget::Normal &&
actTypeA != ActivityWidget::Branch &&
- widgetA->asForkJoinWidget() == NULL && !isSignal &&!isObjectNode) {
+ widgetA->asForkJoinWidget() == 0 && !isSignal &&!isObjectNode) {
return false;
}
// only Forks and Branches can have more than one "outgoing" transition
- if (actA != NULL && actTypeA != ActivityWidget::Branch) {
+ if (actA != 0 && actTypeA != ActivityWidget::Branch) {
AssociationWidgetList list = widgetA->associationWidgetList();
foreach (AssociationWidget* assoc, list) {
if (assoc->widgetForRole(Uml::RoleType::A) == widgetA) {
diff --git a/umbrello/clipboard/umlclipboard.cpp b/umbrello/clipboard/umlclipboard.cpp
index 64aa619..f42da57 100644
--- a/umbrello/clipboard/umlclipboard.cpp
+++ b/umbrello/clipboard/umlclipboard.cpp
@@ -80,14 +80,14 @@ QMimeData* UMLClipboard::copy(bool fromView/*=false*/)
if (fromView) {
m_type = clip4;
UMLView *view = UMLApp::app()->currentView();
- if (view == NULL) {
+ if (view == 0) {
uError() << "UMLApp::app()->currentView() is NULL";
- return NULL;
+ return 0;
}
UMLScene *scene = view->umlScene();
- if (scene == NULL) {
+ if (scene == 0) {
uError() << "currentView umlScene() is NULL";
- return NULL;
+ return 0;
}
m_WidgetList = scene->selectedWidgetsExt();
//if there is no selected widget then there is no copy action
@@ -128,7 +128,7 @@ QMimeData* UMLClipboard::copy(bool fromView/*=false*/)
if (m_type == clip2) {
foreach (UMLView* view, m_ViewList) {
UMLScene *scene = view->umlScene();
- if (scene == NULL) {
+ if (scene == 0) {
uError() << "currentView umlScene() is NULL";
continue;
}
@@ -467,7 +467,7 @@ bool UMLClipboard::pasteClip2(const QMimeData* data)
}
if (NoteWidget::s_pCurrentNote) {
- NoteWidget::s_pCurrentNote = NULL;
+ NoteWidget::s_pCurrentNote = 0;
} else {
foreach (UMLView* pView, views) {
if (!doc->addUMLView(pView)) {
@@ -607,7 +607,7 @@ bool UMLClipboard::pasteClip5(const QMimeData* data)
}
UMLClassifier *parent = lvitem->umlObject()->asUMLClassifier();
- if (parent == NULL) {
+ if (parent == 0) {
uError() << "parent is not a UMLClassifier";
return false;
}
diff --git a/umbrello/clipboard/umldragdata.cpp b/umbrello/clipboard/umldragdata.cpp
index b80ff18..933ab32 100644
--- a/umbrello/clipboard/umldragdata.cpp
+++ b/umbrello/clipboard/umldragdata.cpp
@@ -326,7 +326,7 @@ bool UMLDragData::decodeClip2(const QMimeData* mimeData, UMLObjectList& objects,
// Load UMLObjects
QDomNode objectsNode = xmiClipNode.firstChild();
- if (NoteWidget::s_pCurrentNote == NULL) {
+ if (NoteWidget::s_pCurrentNote == 0) {
if (!UMLDragData::decodeObjects(objectsNode, objects, true)) {
return false;
}
@@ -839,10 +839,10 @@ bool UMLDragData::decodeViews(QDomNode& umlviewsNode, UMLViewList& diagrams)
QString type = diagramElement.attribute(QLatin1String("type"), QLatin1String("0"));
Uml::DiagramType::Enum dt = Uml::DiagramType::fromInt(type.toInt());
UMLListViewItem *parent = listView->findFolderForDiagram(dt);
- if (parent == NULL)
+ if (parent == 0)
return false;
UMLObject *po = parent->umlObject();
- if (po == NULL || po->baseType() != UMLObject::ot_Folder) {
+ if (po == 0 || po->baseType() != UMLObject::ot_Folder) {
uError() << "Bad parent for view.";
return false;
}
diff --git a/umbrello/codegenerators/ada/adawriter.cpp b/umbrello/codegenerators/ada/adawriter.cpp
index 06b4564..9d23b13 100644
--- a/umbrello/codegenerators/ada/adawriter.cpp
+++ b/umbrello/codegenerators/ada/adawriter.cpp
@@ -120,12 +120,12 @@ QString AdaWriter::packageName(UMLPackage *p)
QString retval;
if (umlPkg == UMLApp::app()->document()->rootFolder(Uml::ModelType::Logical))
- umlPkg = NULL;
+ umlPkg = 0;
UMLClassifier *c = p->asUMLClassifier();
- if (umlPkg == NULL) {
+ if (umlPkg == 0) {
retval = className;
- if (c == NULL || !isOOClass(c))
+ if (c == 0 || !isOOClass(c))
retval.append(defaultPackageSuffix);
} else {
retval = umlPkg->fullyQualifiedName(QLatin1String("."));
@@ -146,7 +146,7 @@ void AdaWriter::computeAssocTypeAndRole(UMLClassifier *c,
QString& typeName, QString& roleName)
{
UMLClassifier* assocEnd = a->getObject(Uml::RoleType::B)->asUMLClassifier();
- if (assocEnd == NULL)
+ if (assocEnd == 0)
return;
const Uml::AssociationType::Enum assocType = a->getAssocType();
if (assocType != Uml::AssociationType::Aggregation && assocType != Uml::AssociationType::Composition)
@@ -177,7 +177,7 @@ void AdaWriter::computeAssocTypeAndRole(UMLClassifier *c,
void AdaWriter::declareClass(UMLClassifier *c, QTextStream &ada)
{
UMLClassifierList superclasses = c->getSuperClasses();
- UMLClassifier *firstSuperClass = NULL;
+ UMLClassifier *firstSuperClass = 0;
if (!superclasses.isEmpty()) {
foreach (UMLClassifier* super, superclasses) {
if (!super->isInterface()) {
@@ -185,7 +185,7 @@ void AdaWriter::declareClass(UMLClassifier *c, QTextStream &ada)
break;
}
}
- if (firstSuperClass == NULL)
+ if (firstSuperClass == 0)
firstSuperClass = superclasses.first();
}
const QString name = className(c);
@@ -230,7 +230,7 @@ void AdaWriter::writeClass(UMLClassifier *c)
return;
}
- QFile *file = NULL;
+ QFile *file = 0;
bool isNewFile = false;
PackageFileMap::iterator it = m_pkgsGenerated.find(pkg);
if (it != m_pkgsGenerated.end()) {
@@ -287,7 +287,7 @@ void AdaWriter::writeClass(UMLClassifier *c)
} else {
// Check whether it's a data type.
UMLClassifier *typeObj = t->getType();
- if (typeObj == NULL) {
+ if (typeObj == 0) {
uError() << "template_param " << typeName << ": typeObj is NULL";
ada << indent() << "type " << formalName << " is new " << typeName
<< " with private; -- CHECK: codegen error"
diff --git a/umbrello/codegenerators/classifiercodedocument.cpp b/umbrello/codegenerators/classifiercodedocument.cpp
index 59da834..33ec3a0 100644
--- a/umbrello/codegenerators/classifiercodedocument.cpp
+++ b/umbrello/codegenerators/classifiercodedocument.cpp
@@ -302,7 +302,7 @@ QList<CodeOperation*> ClassifierCodeDocument::getCodeOperations ()
void ClassifierCodeDocument::addOperation (UMLClassifierListItem * o)
{
UMLOperation *op = o->asUMLOperation();
- if (op == NULL) {
+ if (op == 0) {
uError() << "arg is not a UMLOperation";
return;
}
@@ -670,7 +670,7 @@ ClassifierCodeDocument::findCodeClassFieldFromParentID (Uml::ID::Type id,
<< Uml::ID::toString(id) << " (role id:" << role_id
<< ") Do you have a corrupt classifier code document?";
- return (CodeClassField*) NULL; // not found
+ return (CodeClassField*) 0; // not found
}
/**
@@ -785,7 +785,7 @@ TextBlock * ClassifierCodeDocument::findCodeClassFieldTextBlockByTag (const QStr
return m;
}
// if we get here, we failed.
- return (TextBlock*) NULL;
+ return (TextBlock*) 0;
}
diff --git a/umbrello/codegenerators/codeclassfield.cpp b/umbrello/codegenerators/codeclassfield.cpp
index 8594d78..161b800 100644
--- a/umbrello/codegenerators/codeclassfield.cpp
+++ b/umbrello/codegenerators/codeclassfield.cpp
@@ -430,7 +430,7 @@ CodeAccessorMethod * CodeClassField::findMethodByType (CodeAccessorMethod::Acces
// argh. this wont work because "accessorType' doesn't inherit from QObject.
if(m_methodMap->contains(type))
return ((*m_methodMap)[type]);
- CodeAccessorMethod * obj = NULL;
+ CodeAccessorMethod * obj = 0;
*/
if(role_id > 1 || role_id < 0)
{
@@ -451,7 +451,7 @@ CodeAccessorMethod * CodeClassField::findMethodByType (CodeAccessorMethod::Acces
}
- return (CodeAccessorMethod *) NULL;
+ return (CodeAccessorMethod *) 0;
}
void CodeClassField::initAccessorMethods()
@@ -642,7 +642,7 @@ void CodeClassField::initFields(bool inConstructor)
{
m_writeOutMethods = false;
m_listClassName.clear();
- m_declCodeBlock = NULL;
+ m_declCodeBlock = 0;
// m_methodMap = new QMap<CodeAccessorMethod::AccessorType, CodeAccessorMethod *>;
diff --git a/umbrello/codegenerators/codeclassfielddeclarationblock.cpp b/umbrello/codegenerators/codeclassfielddeclarationblock.cpp
index 28c5eb6..5fa425a 100644
--- a/umbrello/codegenerators/codeclassfielddeclarationblock.cpp
+++ b/umbrello/codegenerators/codeclassfielddeclarationblock.cpp
@@ -140,7 +140,7 @@ void CodeClassFieldDeclarationBlock::syncToParent ()
if (!(getParentClassField()->parentIsAttribute()))
{
UMLRole * parent = getParentObject()->asUMLRole();
- if (parent == NULL)
+ if (parent == 0)
return;
if (parent->name().isEmpty())
{
diff --git a/umbrello/codegenerators/codedocument.cpp b/umbrello/codegenerators/codedocument.cpp
index 833860f..6d69649 100644
--- a/umbrello/codegenerators/codedocument.cpp
+++ b/umbrello/codegenerators/codedocument.cpp
@@ -28,7 +28,7 @@
*/
CodeDocument::CodeDocument () : CodeGenObjectWithTextBlocks(this),
m_lastTagIndex(0), m_filename(QString()), m_fileExtension(QString()),
- m_ID(QString()), m_pathName(QString()), m_package(NULL), m_writeOutCode(true)
+ m_ID(QString()), m_pathName(QString()), m_package(0), m_writeOutCode(true)
{
setHeader(new CodeComment(this));
// m_dialog = new CodeDocumentDialog();
@@ -399,7 +399,7 @@ void CodeDocument::setAttributesFromNode (QDomElement & root)
UMLObject *o = umldoc->findUMLObject(pkgStr);
m_package = o->asUMLPackage();
}
- if (m_package == NULL) {
+ if (m_package == 0) {
UMLObject *o = umldoc->findObjectById(Uml::ID::fromString(pkgStr));
m_package = o->asUMLPackage();
}
@@ -510,7 +510,7 @@ TextBlock * CodeDocument::findTextBlockByTag(const QString &tag, bool descendInt
if (m_childTextBlockTagMap.contains(tag))
return m_childTextBlockTagMap[tag];
- return NULL;
+ return 0;
}
/**
@@ -520,7 +520,7 @@ TextBlock * CodeDocument::findTextBlockByTag(const QString &tag, bool descendInt
TextBlock * CodeDocument::findCodeClassFieldTextBlockByTag (const QString &tag)
{
uWarning() << "Called findCodeClassFieldMethodByTag(" << tag << ") for a regular CodeDocument";
- return NULL;
+ return 0;
}
QDebug operator<<(QDebug os, const CodeDocument& obj)
diff --git a/umbrello/codegenerators/codegenerator.cpp b/umbrello/codegenerators/codegenerator.cpp
index a8c4a12..32b19ca 100644
--- a/umbrello/codegenerators/codegenerator.cpp
+++ b/umbrello/codegenerators/codegenerator.cpp
@@ -114,7 +114,7 @@ CodeDocument * CodeGenerator::findCodeDocumentByID(const QString &tag)
return doc;
}
else {
- return NULL;
+ return 0;
}
}
diff --git a/umbrello/codegenerators/codegenfactory.cpp b/umbrello/codegenerators/codegenfactory.cpp
index 5296517..fb15571 100644
--- a/umbrello/codegenerators/codegenfactory.cpp
+++ b/umbrello/codegenerators/codegenfactory.cpp
@@ -193,9 +193,9 @@ CodeDocument * newClassifierCodeDocument(UMLClassifier * c)
{
Settings::OptionState optionState = Settings::optionState();
if (!optionState.generalState.newcodegen) {
- return NULL;
+ return 0;
}
- ClassifierCodeDocument *retval = NULL;
+ ClassifierCodeDocument *retval = 0;
switch (UMLApp::app()->activeLanguage()) {
case Uml::ProgrammingLanguage::Cpp:
retval = new CPPSourceCodeDocument(c);
@@ -221,7 +221,7 @@ CodeDocument * newClassifierCodeDocument(UMLClassifier * c)
CodeOperation *newCodeOperation(ClassifierCodeDocument *ccd, UMLOperation * op)
{
- CodeOperation *retval = NULL;
+ CodeOperation *retval = 0;
switch (UMLApp::app()->activeLanguage()) {
case Uml::ProgrammingLanguage::Cpp:
{
@@ -264,7 +264,7 @@ CodeOperation *newCodeOperation(ClassifierCodeDocument *ccd, UMLOperation * op)
CodeClassField * newCodeClassField(ClassifierCodeDocument *ccd, UMLAttribute *at)
{
- CodeClassField *retval = NULL;
+ CodeClassField *retval = 0;
switch (UMLApp::app()->activeLanguage()) {
case Uml::ProgrammingLanguage::Cpp:
retval = new CPPCodeClassField(ccd, at);
@@ -288,7 +288,7 @@ CodeClassField * newCodeClassField(ClassifierCodeDocument *ccd, UMLAttribute *at
CodeClassField * newCodeClassField(ClassifierCodeDocument *ccd, UMLRole *role)
{
- CodeClassField *retval = NULL;
+ CodeClassField *retval = 0;
switch (UMLApp::app()->activeLanguage()) {
case Uml::ProgrammingLanguage::Cpp:
retval = new CPPCodeClassField(ccd, role);
@@ -314,7 +314,7 @@ CodeAccessorMethod * newCodeAccessorMethod(ClassifierCodeDocument *ccd,
CodeClassField *cf,
CodeAccessorMethod::AccessorType type)
{
- CodeAccessorMethod *retval = NULL;
+ CodeAccessorMethod *retval = 0;
switch (UMLApp::app()->activeLanguage()) {
case Uml::ProgrammingLanguage::Cpp:
{
@@ -363,7 +363,7 @@ CodeAccessorMethod * newCodeAccessorMethod(ClassifierCodeDocument *ccd,
CodeClassFieldDeclarationBlock * newDeclarationCodeBlock(ClassifierCodeDocument *cd,
CodeClassField * cf)
{
- CodeClassFieldDeclarationBlock *retval = NULL;
+ CodeClassFieldDeclarationBlock *retval = 0;
switch (UMLApp::app()->activeLanguage()) {
case Uml::ProgrammingLanguage::Cpp:
{
@@ -452,11 +452,11 @@ CodeGenPolicyExt* newCodeGenPolicyExt(Uml::ProgrammingLanguage::Enum pl)
return new RubyCodeGenerationPolicy();
break;
default:
- return NULL;
+ return 0;
}
}
- return NULL;
+ return 0;
}
} // end namespace CodeGenFactory
diff --git a/umbrello/codegenerators/codegenobjectwithtextblocks.cpp b/umbrello/codegenerators/codegenobjectwithtextblocks.cpp
index 6e163a9..77ab293 100644
--- a/umbrello/codegenerators/codegenobjectwithtextblocks.cpp
+++ b/umbrello/codegenerators/codegenobjectwithtextblocks.cpp
@@ -143,7 +143,7 @@ CodeGenObjectWithTextBlocks * CodeGenObjectWithTextBlocks::findParentObjectForTa
{
// what??!? no tag, then CANT be here
if (tag.isEmpty())
- return (CodeGenObjectWithTextBlocks*) NULL;
+ return (CodeGenObjectWithTextBlocks*) 0;
if (!findTextBlockByTag(tag)) {
// may be hiding in child hierarchical codeblock
@@ -162,7 +162,7 @@ CodeGenObjectWithTextBlocks * CodeGenObjectWithTextBlocks::findParentObjectForTa
// shouldn't happen unless the textblock doesn't exist in this object
// or its children at all
- return (CodeGenObjectWithTextBlocks*) NULL;
+ return (CodeGenObjectWithTextBlocks*) 0;
}
/**
@@ -187,7 +187,7 @@ HierarchicalCodeBlock * CodeGenObjectWithTextBlocks::getHierarchicalCodeBlock (c
codeBlock->getComment()->setWriteOutText(false);
if (!addTextBlock(codeBlock)) {
delete codeBlock;
- return (HierarchicalCodeBlock*) NULL;
+ return (HierarchicalCodeBlock*) 0;
}
}
@@ -219,7 +219,7 @@ CodeBlockWithComments * CodeGenObjectWithTextBlocks::getCodeBlockWithComments (c
codeBlock->getComment()->setWriteOutText(false);
if (!addTextBlock(codeBlock)) {
delete codeBlock;
- return (CodeBlockWithComments*) NULL;
+ return (CodeBlockWithComments*) 0;
}
}
codeBlock->setOverallIndentationLevel (indentLevel);
@@ -324,7 +324,7 @@ void CodeGenObjectWithTextBlocks::resetTextBlocks()
{
/************** @todo I had to deactivate this code:
TextBlock *tb;
- for (TextBlockListIt it(m_textblockVector); (tb = it.current()) != NULL; ++it)
+ for (TextBlockListIt it(m_textblockVector); (tb = it.current()) != 0; ++it)
delete tb;
************** else crash happens on loading an XMI file
*************/
diff --git a/umbrello/codegenerators/cpp/cppheadercodeaccessormethod.cpp b/umbrello/codegenerators/cpp/cppheadercodeaccessormethod.cpp
index 5524c61..5cde1ab 100644
--- a/umbrello/codegenerators/cpp/cppheadercodeaccessormethod.cpp
+++ b/umbrello/codegenerators/cpp/cppheadercodeaccessormethod.cpp
@@ -48,7 +48,7 @@ void CPPHeaderCodeAccessorMethod::updateContent()
CPPCodeClassField * cppfield = dynamic_cast<CPPCodeClassField*>(parentField);
// Check for dynamic casting failure!
- if (cppfield == NULL)
+ if (cppfield == 0)
{
uError() << "cppfield: invalid dynamic cast";
return;
@@ -58,7 +58,7 @@ void CPPHeaderCodeAccessorMethod::updateContent()
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
// Check for dynamic casting failure!
- if (policy == NULL)
+ if (policy == 0)
{
uError() << "policy: invalid dynamic cast";
return;
diff --git a/umbrello/codegenerators/cpp/cppheadercodeclassfielddeclarationblock.cpp b/umbrello/codegenerators/cpp/cppheadercodeclassfielddeclarationblock.cpp
index 4e05042..274b9ba 100644
--- a/umbrello/codegenerators/cpp/cppheadercodeclassfielddeclarationblock.cpp
+++ b/umbrello/codegenerators/cpp/cppheadercodeclassfielddeclarationblock.cpp
@@ -28,7 +28,7 @@ CPPHeaderCodeClassFieldDeclarationBlock::~CPPHeaderCodeClassFieldDeclarationBloc
void CPPHeaderCodeClassFieldDeclarationBlock::updateContent()
{
UMLObject *umlparent = CodeClassFieldDeclarationBlock::getParentObject();
- if (umlparent == NULL) {
+ if (umlparent == 0) {
return;
}
@@ -36,7 +36,7 @@ void CPPHeaderCodeClassFieldDeclarationBlock::updateContent()
CPPCodeClassField * hcppcf = dynamic_cast<CPPCodeClassField*>(cf);
// Check for dynamic casting failure!
- if (hcppcf == NULL)
+ if (hcppcf == 0)
{
uError() << "hcppcf: invalid dynamic cast";
return;
diff --git a/umbrello/codegenerators/cpp/cppheadercodedocument.cpp b/umbrello/codegenerators/cpp/cppheadercodedocument.cpp
index 6cfb48e..b16c7e9 100644
--- a/umbrello/codegenerators/cpp/cppheadercodedocument.cpp
+++ b/umbrello/codegenerators/cpp/cppheadercodedocument.cpp
@@ -276,7 +276,7 @@ void CPPHeaderCodeDocument::resetTextBlocks()
*/
bool CPPHeaderCodeDocument::addCodeOperation(CodeOperation* op)
{
- if (op == NULL) {
+ if (op == 0) {
uDebug() << "CodeOperation is null!";
return false;;
}
@@ -286,26 +286,26 @@ bool CPPHeaderCodeDocument::addCodeOperation(CodeOperation* op)
switch (scope) {
default:
case Uml::Visibility::Public:
- return (m_pubOperationsBlock == NULL ? false : m_pubOperationsBlock->addTextBlock(op));
+ return (m_pubOperationsBlock == 0 ? false : m_pubOperationsBlock->addTextBlock(op));
break;
case Uml::Visibility::Protected:
- return (m_protOperationsBlock == NULL ? false : m_protOperationsBlock->addTextBlock(op));
+ return (m_protOperationsBlock == 0 ? false : m_protOperationsBlock->addTextBlock(op));
break;
case Uml::Visibility::Private:
- return (m_privOperationsBlock == NULL ? false : m_privOperationsBlock->addTextBlock(op));
+ return (m_privOperationsBlock == 0 ? false : m_privOperationsBlock->addTextBlock(op));
break;
}
} else {
switch (scope) {
default:
case Uml::Visibility::Public:
- return (m_pubConstructorBlock == NULL ? false : m_pubConstructorBlock->addTextBlock(op));
+ return (m_pubConstructorBlock == 0 ? false : m_pubConstructorBlock->addTextBlock(op));
break;
case Uml::Visibility::Protected:
- return (m_protConstructorBlock == NULL ? false : m_protConstructorBlock->addTextBlock(op));
+ return (m_protConstructorBlock == 0 ? false : m_protConstructorBlock->addTextBlock(op));
break;
case Uml::Visibility::Private:
- return (m_privConstructorBlock == NULL ? false : m_privConstructorBlock->addTextBlock(op));
+ return (m_privConstructorBlock == 0 ? false : m_privConstructorBlock->addTextBlock(op));
break;
}
}
@@ -337,7 +337,7 @@ void CPPHeaderCodeDocument::updateContent()
{
// Gather info on the various fields and parent objects of this class...
UMLClassifier * c = getParentClassifier();
- Q_ASSERT(c != NULL);
+ Q_ASSERT(c != 0);
CodeGenPolicyExt *pe = UMLApp::app()->policyExt();
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
diff --git a/umbrello/codegenerators/cpp/cppsourcecodeaccessormethod.cpp b/umbrello/codegenerators/cpp/cppsourcecodeaccessormethod.cpp
index f980c49..2f5dd75 100644
--- a/umbrello/codegenerators/cpp/cppsourcecodeaccessormethod.cpp
+++ b/umbrello/codegenerators/cpp/cppsourcecodeaccessormethod.cpp
@@ -48,7 +48,7 @@ void CPPSourceCodeAccessorMethod::updateContent()
CPPCodeClassField * cppfield = dynamic_cast<CPPCodeClassField*>(parentField);
// Check for dynamic casting failure!
- if(cppfield == NULL)
+ if(cppfield == 0)
{
uError() << "cppfield: invalid dynamic cast";
return;
@@ -58,7 +58,7 @@ void CPPSourceCodeAccessorMethod::updateContent()
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
// Check for dynamic casting failure!
- if(policy == NULL)
+ if(policy == 0)
{
uError() << "policy: invalid dynamic cast";
return;
@@ -101,7 +101,7 @@ void CPPSourceCodeAccessorMethod::updateMethodDeclaration()
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
// Check for dynamic casting failure!
- if (policy == NULL)
+ if (policy == 0)
{
uError() << "policy: invalid dynamic cast";
return;
@@ -110,7 +110,7 @@ void CPPSourceCodeAccessorMethod::updateMethodDeclaration()
CPPCodeClassField * cppfield = dynamic_cast<CPPCodeClassField*>(parentField);
// Check for dynamic casting failure!
- if (cppfield == NULL)
+ if (cppfield == 0)
{
uError() << "cppfield: invalid dynamic cast";
return;
diff --git a/umbrello/codegenerators/cpp/cppsourcecodeclassfielddeclarationblock.cpp b/umbrello/codegenerators/cpp/cppsourcecodeclassfielddeclarationblock.cpp
index 0925dec..b839d56 100644
--- a/umbrello/codegenerators/cpp/cppsourcecodeclassfielddeclarationblock.cpp
+++ b/umbrello/codegenerators/cpp/cppsourcecodeclassfielddeclarationblock.cpp
@@ -31,7 +31,7 @@ void CPPSourceCodeClassFieldDeclarationBlock::updateContent()
CPPCodeClassField * jcf = dynamic_cast<CPPCodeClassField*>(cf);
// Check for dynamic casting failure!
- if (jcf == NULL)
+ if (jcf == 0)
{
uError() << "jcf: invalid dynamic cast";
return;
diff --git a/umbrello/codegenerators/cpp/cppwriter.cpp b/umbrello/codegenerators/cpp/cppwriter.cpp
index 6aab628..f7f11f6 100644
--- a/umbrello/codegenerators/cpp/cppwriter.cpp
+++ b/umbrello/codegenerators/cpp/cppwriter.cpp
@@ -1289,7 +1289,7 @@ void CppWriter::writeOperations(UMLClassifier *c, UMLOperationList &oplist, bool
void CppWriter::printAssociationIncludeDecl(UMLAssociationList list, Uml::ID::Type myId, QTextStream &stream)
{
foreach (UMLAssociation *a, list) {
- UMLClassifier *current = NULL;
+ UMLClassifier *current = 0;
bool isFirstClass = true;
// only use OTHER classes (e.g. we don't need to write includes for ourselves!!
diff --git a/umbrello/codegenerators/csharp/csharpwriter.cpp b/umbrello/codegenerators/csharp/csharpwriter.cpp
index b26d8a8..349b5a9 100644
--- a/umbrello/codegenerators/csharp/csharpwriter.cpp
+++ b/umbrello/codegenerators/csharp/csharpwriter.cpp
@@ -191,7 +191,7 @@ void CSharpWriter::writeClass(UMLClassifier *c)
UMLPackage *container = c->umlPackage();
if (container == logicalView)
- container = NULL;
+ container = 0;
UMLPackageList includes;
findObjectsRelated(c, includes);
@@ -662,7 +662,7 @@ void CSharpWriter::writeAssociatedAttributes(UMLAssociationList &associated, UML
continue;
UMLObject *o = a->getObject(Uml::RoleType::B);
- if (o == NULL) {
+ if (o == 0) {
uError() << "composition role B object is NULL";
continue;
}
diff --git a/umbrello/codegenerators/d/dclassifiercodedocument.cpp b/umbrello/codegenerators/d/dclassifiercodedocument.cpp
index 5739bb2..438a5d6 100644
--- a/umbrello/codegenerators/d/dclassifiercodedocument.cpp
+++ b/umbrello/codegenerators/d/dclassifiercodedocument.cpp
@@ -280,7 +280,7 @@ void DClassifierCodeDocument::updateContent()
{
// Gather info on the various fields and parent objects of this class...
UMLClassifier * c = getParentClassifier();
- Q_ASSERT(c != NULL);
+ Q_ASSERT(c != 0);
CodeGenerationPolicy * commonPolicy = UMLApp::app()->commonPolicy();
CodeGenPolicyExt * pe = UMLApp::app()->policyExt();
DCodeGenerationPolicy * policy = dynamic_cast<DCodeGenerationPolicy*>(pe);
diff --git a/umbrello/codegenerators/d/dcodeaccessormethod.cpp b/umbrello/codegenerators/d/dcodeaccessormethod.cpp
index 2e59f53..9570c16 100644
--- a/umbrello/codegenerators/d/dcodeaccessormethod.cpp
+++ b/umbrello/codegenerators/d/dcodeaccessormethod.cpp
@@ -121,7 +121,7 @@ void DCodeAccessorMethod::updateMethodDeclaration()
DCodeClassField * dfield = dynamic_cast<DCodeClassField*>(getParentClassField());
// Check for dynamic casting failure!
- if (dfield == NULL)
+ if (dfield == 0)
{
uError() << "dfield: invalid dynamic cast";
return;
diff --git a/umbrello/codegenerators/d/dcodeclassfielddeclarationblock.cpp b/umbrello/codegenerators/d/dcodeclassfielddeclarationblock.cpp
index 3091c23..fdd6439 100644
--- a/umbrello/codegenerators/d/dcodeclassfielddeclarationblock.cpp
+++ b/umbrello/codegenerators/d/dcodeclassfielddeclarationblock.cpp
@@ -93,7 +93,7 @@ void DCodeClassFieldDeclarationBlock::updateContent()
UMLRole * role = cf->getParentObject()->asUMLRole();
// Check for dynamic casting failure!
- if (role == NULL)
+ if (role == 0)
{
uError() << "role: invalid dynamic cast";
return;
diff --git a/umbrello/codegenerators/d/dwriter.cpp b/umbrello/codegenerators/d/dwriter.cpp
index 816252c..9bdc4d2 100644
--- a/umbrello/codegenerators/d/dwriter.cpp
+++ b/umbrello/codegenerators/d/dwriter.cpp
@@ -762,7 +762,7 @@ QStringList DWriter::defaultDatatypes()
bool DWriter::compareDMethod(UMLOperation *op1, UMLOperation *op2)
{
- if (op1 == NULL || op2 == NULL)
+ if (op1 == 0 || op2 == 0)
return false;
if (op1 == op2)
return true;
diff --git a/umbrello/codegenerators/hierarchicalcodeblock.cpp b/umbrello/codegenerators/hierarchicalcodeblock.cpp
index e93d489..9b6edd2 100644
--- a/umbrello/codegenerators/hierarchicalcodeblock.cpp
+++ b/umbrello/codegenerators/hierarchicalcodeblock.cpp
@@ -368,7 +368,7 @@ TextBlock * HierarchicalCodeBlock::findCodeClassFieldTextBlockByTag (const QStri
uError() << "HierarchicalCodeBlock: findCodeClassFieldTextBlockByTag() finds NO parent document! Badly constructed textblock?!?";
// if we get here, we failed.
- return (TextBlock*) NULL;
+ return (TextBlock*) 0;
}
void HierarchicalCodeBlock::initAttributes()
diff --git a/umbrello/codegenerators/java/javaclassifiercodedocument.cpp b/umbrello/codegenerators/java/javaclassifiercodedocument.cpp
index b28d294..c58717c 100644
--- a/umbrello/codegenerators/java/javaclassifiercodedocument.cpp
+++ b/umbrello/codegenerators/java/javaclassifiercodedocument.cpp
@@ -117,9 +117,9 @@ void JavaClassifierCodeDocument::init ()
bool JavaClassifierCodeDocument::addCodeOperation (CodeOperation * op)
{
if (!op->getParentOperation()->isLifeOperation())
- return operationsBlock == NULL ? false : operationsBlock->addTextBlock(op);
+ return operationsBlock == 0 ? false : operationsBlock->addTextBlock(op);
else
- return constructorBlock == NULL ? false : constructorBlock->addTextBlock(op);
+ return constructorBlock == 0 ? false : constructorBlock->addTextBlock(op);
}
// Sigh. NOT optimal. The only reason that we need to have this
@@ -273,7 +273,7 @@ void JavaClassifierCodeDocument::updateContent()
{
// Gather info on the various fields and parent objects of this class...
UMLClassifier * c = getParentClassifier();
- Q_ASSERT(c != NULL);
+ Q_ASSERT(c != 0);
CodeGenerationPolicy * commonPolicy = UMLApp::app()->commonPolicy();
CodeGenPolicyExt * pe = UMLApp::app()->policyExt();
JavaCodeGenerationPolicy * policy = dynamic_cast<JavaCodeGenerationPolicy*>(pe);
diff --git a/umbrello/codegenerators/java/javacodeclassfielddeclarationblock.cpp b/umbrello/codegenerators/java/javacodeclassfielddeclarationblock.cpp
index 74e334f..3552f54 100644
--- a/umbrello/codegenerators/java/javacodeclassfielddeclarationblock.cpp
+++ b/umbrello/codegenerators/java/javacodeclassfielddeclarationblock.cpp
@@ -92,7 +92,7 @@ void JavaCodeClassFieldDeclarationBlock::updateContent()
UMLRole * role = cf->getParentObject()->asUMLRole();
// Check for dynamic casting failure
- if (role == NULL)
+ if (role == 0)
{
uError() << "role: invalid dynamic cast";
return;
diff --git a/umbrello/codegenerators/java/javacodeoperation.cpp b/umbrello/codegenerators/java/javacodeoperation.cpp
index 608b584..46d8ac5 100644
--- a/umbrello/codegenerators/java/javacodeoperation.cpp
+++ b/umbrello/codegenerators/java/javacodeoperation.cpp
@@ -111,7 +111,7 @@ int JavaCodeOperation::lastEditableLine()
ClassifierCodeDocument * doc = dynamic_cast<ClassifierCodeDocument*>(getParentDocument());
// Check for dynamic casting failure
- if (doc == NULL)
+ if (doc == 0)
{
uError() << "doc: invalid dynamic cast";
return -1;
diff --git a/umbrello/codegenerators/java/javawriter.cpp b/umbrello/codegenerators/java/javawriter.cpp
index 2e07891..1a2ed8c 100644
--- a/umbrello/codegenerators/java/javawriter.cpp
+++ b/umbrello/codegenerators/java/javawriter.cpp
@@ -767,7 +767,7 @@ QStringList JavaWriter::defaultDatatypes()
*/
bool JavaWriter::compareJavaMethod(UMLOperation *op1, UMLOperation *op2)
{
- if (op1 == NULL || op2 == NULL)
+ if (op1 == 0 || op2 == 0)
return false;
if (op1 == op2)
return true;
diff --git a/umbrello/codegenerators/pascal/pascalwriter.cpp b/umbrello/codegenerators/pascal/pascalwriter.cpp
index f9089e6..5781bd4 100644
--- a/umbrello/codegenerators/pascal/pascalwriter.cpp
+++ b/umbrello/codegenerators/pascal/pascalwriter.cpp
@@ -87,12 +87,12 @@ QString PascalWriter::qualifiedName(UMLPackage *p, bool withType, bool byValue)
QString retval;
if (umlPkg == UMLApp::app()->document()->rootFolder(Uml::ModelType::Logical))
- umlPkg = NULL;
+ umlPkg = 0;
UMLClassifier *c = p->asUMLClassifier();
- if (umlPkg == NULL) {
+ if (umlPkg == 0) {
retval = className;
- if (c == NULL || !isOOClass(c))
+ if (c == 0 || !isOOClass(c))
retval.append(defaultPackageSuffix);
} else {
retval = umlPkg->fullyQualifiedName(QLatin1String("."));
@@ -128,7 +128,7 @@ void PascalWriter::computeAssocTypeAndRole
}
}
UMLClassifier* c = a->getObject(Uml::RoleType::A)->asUMLClassifier();
- if (c == NULL)
+ if (c == 0)
return;
typeName = cleanName(c->name());
if (! a->getMultiplicity(Uml::RoleType::A).isEmpty())
diff --git a/umbrello/codegenerators/php/php5writer.cpp b/umbrello/codegenerators/php/php5writer.cpp
index 622eb00..57abca0 100644
--- a/umbrello/codegenerators/php/php5writer.cpp
+++ b/umbrello/codegenerators/php/php5writer.cpp
@@ -3094,7 +3094,7 @@ void Php5Writer::writeClass(UMLClassifier *c)
//maybe we should parse the string here and take multiplicity into account to decide
//which container to use.
UMLObject *o = a->getObject(Uml::RoleType::A);
- if (o == NULL) {
+ if (o == 0) {
uError() << "aggregation role A object is NULL" << endl;
continue;
}
@@ -3112,7 +3112,7 @@ void Php5Writer::writeClass(UMLClassifier *c)
foreach (UMLAssociation* a, compositions) {
// see comment on Aggregation about multiplicity...
UMLObject *o = a->getObject(Uml::RoleType::A);
- if (o == NULL) {
+ if (o == 0) {
uError() << "composition role A object is NULL";
continue;
}
diff --git a/umbrello/codegenerators/ruby/rubyclassifiercodedocument.cpp b/umbrello/codegenerators/ruby/rubyclassifiercodedocument.cpp
index 7e0e012..15a46b9 100644
--- a/umbrello/codegenerators/ruby/rubyclassifiercodedocument.cpp
+++ b/umbrello/codegenerators/ruby/rubyclassifiercodedocument.cpp
@@ -353,7 +353,7 @@ void RubyClassifierCodeDocument::updateContent()
bool isInterface = parentIsInterface();
bool hasOperationMethods = false;
- Q_ASSERT(c != NULL);
+ Q_ASSERT(c != 0);
if (c) {
UMLOperationList list = c->getOpList();
hasOperationMethods = ! list.isEmpty();
diff --git a/umbrello/codegenerators/ruby/rubycodeaccessormethod.cpp b/umbrello/codegenerators/ruby/rubycodeaccessormethod.cpp
index 0facc3a..2985efb 100644
--- a/umbrello/codegenerators/ruby/rubycodeaccessormethod.cpp
+++ b/umbrello/codegenerators/ruby/rubycodeaccessormethod.cpp
@@ -81,7 +81,7 @@ void RubyCodeAccessorMethod::updateContent()
RubyCodeClassField * rubyfield = dynamic_cast<RubyCodeClassField*>(parentField);
// Check for dynamic casting failure!
- if (rubyfield == NULL)
+ if (rubyfield == 0)
{
uError() << "rubyfield: invalid dynamic cast";
return;
@@ -146,7 +146,7 @@ void RubyCodeAccessorMethod::updateMethodDeclaration()
RubyCodeClassField * rubyfield = dynamic_cast<RubyCodeClassField*>(getParentClassField());
// Check for dynamic casting failure!
- if (rubyfield == NULL)
+ if (rubyfield == 0)
{
uError() << "rubyfield: invalid dynamic cast";
return;
diff --git a/umbrello/codegenerators/ruby/rubycodeoperation.cpp b/umbrello/codegenerators/ruby/rubycodeoperation.cpp
index 6b38ba4..de96e49 100644
--- a/umbrello/codegenerators/ruby/rubycodeoperation.cpp
+++ b/umbrello/codegenerators/ruby/rubycodeoperation.cpp
@@ -203,7 +203,7 @@ int RubyCodeOperation::lastEditableLine()
ClassifierCodeDocument * doc = dynamic_cast<ClassifierCodeDocument*>(getParentDocument());
// Check for dynamic casting failure
- if (doc == NULL)
+ if (doc == 0)
{
uError() << "doc: invalid dynamic cast";
return -1;
diff --git a/umbrello/codegenerators/sql/mysqlwriter.cpp b/umbrello/codegenerators/sql/mysqlwriter.cpp
index 2341971..338f149 100644
--- a/umbrello/codegenerators/sql/mysqlwriter.cpp
+++ b/umbrello/codegenerators/sql/mysqlwriter.cpp
@@ -118,7 +118,7 @@ void MySQLWriter::printAutoIncrements(QTextStream& sql, const UMLEntityAttribute
// and that attribute should have an index on it :/
// get the first attribute of list with auto increment
- UMLEntityAttribute* autoIncrementEntAtt = NULL;
+ UMLEntityAttribute* autoIncrementEntAtt = 0;
foreach(UMLEntityAttribute* ea, entAttList) {
if (ea->getAutoIncrement()) {
autoIncrementEntAtt = ea;
@@ -126,7 +126,7 @@ void MySQLWriter::printAutoIncrements(QTextStream& sql, const UMLEntityAttribute
}
}
- if (autoIncrementEntAtt == NULL) {
+ if (autoIncrementEntAtt == 0) {
return;
}
diff --git a/umbrello/codegenerators/sql/postgresqlwriter.cpp b/umbrello/codegenerators/sql/postgresqlwriter.cpp
index 8def496..f31ae9c 100644
--- a/umbrello/codegenerators/sql/postgresqlwriter.cpp
+++ b/umbrello/codegenerators/sql/postgresqlwriter.cpp
@@ -107,7 +107,7 @@ void PostgreSQLWriter::printAutoIncrements(QTextStream& sql, UMLEntityAttributeL
// alter the table column (set not null)
sql<<"ALTER TABLE "<<cleanName(m_pEntity->name())
<<" ALTER COLUMN "<<cleanName(ea->name())
- <<" SET NOT NULL;";
+ <<" SET NOT 0;";
sql<<m_endl;
diff --git a/umbrello/codegenerators/tcl/tclwriter.cpp b/umbrello/codegenerators/tcl/tclwriter.cpp
index fb8424b..fda3055 100644
--- a/umbrello/codegenerators/tcl/tclwriter.cpp
+++ b/umbrello/codegenerators/tcl/tclwriter.cpp
@@ -407,7 +407,7 @@ void TclWriter::writeAssociationIncl(UMLAssociationList list, Uml::ID::Type myId
const QString &type)
{
foreach (UMLAssociation * a, list) {
- UMLClassifier *classifier = NULL;
+ UMLClassifier *classifier = 0;
writeComm(m_endl + type + m_endl + a->toString() + m_endl + a->doc());
// only use OTHER classes (e.g. we don't need to write includes for ourselves!!
diff --git a/umbrello/codegenerators/vala/valawriter.cpp b/umbrello/codegenerators/vala/valawriter.cpp
index bc8c86a..93b711e 100644
--- a/umbrello/codegenerators/vala/valawriter.cpp
+++ b/umbrello/codegenerators/vala/valawriter.cpp
@@ -228,7 +228,7 @@ void ValaWriter::writeClass(UMLClassifier *c)
//write includes and namespace
UMLPackage *container = c->umlPackage();
if (container == logicalView) {
- container = NULL;
+ container = 0;
}
UMLPackageList includes;
@@ -720,7 +720,7 @@ void ValaWriter::writeAssociatedAttributes(UMLAssociationList &associated, UMLCl
}
UMLObject *o = a->getObject(Uml::RoleType::B);
- if (o == NULL) {
+ if (o == 0) {
uError() << "composition role B object is NULL";
continue;
}
diff --git a/umbrello/codegenwizard/codegenselectpage.cpp b/umbrello/codegenwizard/codegenselectpage.cpp
index d34caae..29b202a 100644
--- a/umbrello/codegenwizard/codegenselectpage.cpp
+++ b/umbrello/codegenwizard/codegenselectpage.cpp
@@ -59,7 +59,7 @@ void CodeGenSelectPage::setClassifierList(UMLClassifierList *classList)
UMLClassifierList cList;
ui_listSelected->clear();
- if (classList == NULL) {
+ if (classList == 0) {
Uml::ProgrammingLanguage::Enum pl = UMLApp::app()->activeLanguage();
switch (pl) {
case Uml::ProgrammingLanguage::PostgreSQL:
diff --git a/umbrello/codegenwizard/codegenstatuspage.cpp b/umbrello/codegenwizard/codegenstatuspage.cpp
index 03659fe..da06165 100644
--- a/umbrello/codegenwizard/codegenstatuspage.cpp
+++ b/umbrello/codegenwizard/codegenstatuspage.cpp
@@ -124,7 +124,7 @@ void CodeGenStatusPage::generateCode()
for (int row = 0; row < ui_tableWidgetStatus->rowCount(); ++row) {
QTableWidgetItem* item = ui_tableWidgetStatus->item(row, 0);
UMLClassifier *concept = doc->findUMLClassifier(item->text());
- if (concept == NULL) {
+ if (concept == 0) {
uError() << "Could not find classifier " << item->text()
<< " - not included in generated code.";
continue;
diff --git a/umbrello/codeimport/adaimport.cpp b/umbrello/codeimport/adaimport.cpp
index 2a064c3..604eaa9 100644
--- a/umbrello/codeimport/adaimport.cpp
+++ b/umbrello/codeimport/adaimport.cpp
@@ -242,7 +242,7 @@ bool AdaImport::parseStmt()
QStringList parentPkgs = name.toLower().split(QLatin1Char('.'));
parentPkgs.pop_back(); // exclude the current package
parseStems(parentPkgs);
- UMLObject *ns = NULL;
+ UMLObject *ns = 0;
if (advance() == QLatin1String("is")) {
ns = Import_Utils::createUMLObject(UMLObject::ot_Package, name,
currentScope(), m_comment);
@@ -284,7 +284,7 @@ bool AdaImport::parseStmt()
QString base = expand(advance());
base.remove(QLatin1String("Standard."), Qt::CaseInsensitive);
UMLObject *type = umldoc->findUMLObject(base, UMLObject::ot_UMLObject, currentScope());
- if (type == NULL) {
+ if (type == 0) {
type = Import_Utils::createUMLObject(UMLObject::ot_Datatype, base, currentScope());
}
UMLObject *subtype = Import_Utils::createUMLObject(type->baseType(), name,
@@ -400,7 +400,7 @@ bool AdaImport::parseStmt()
UMLObject *known = umldoc->findUMLObject(base, UMLObject::ot_UMLObject, currentScope());
t = (known ? known->baseType() : UMLObject::ot_Datatype);
}
- UMLObject *ns = Import_Utils::createUMLObject(t, base, NULL);
+ UMLObject *ns = Import_Utils::createUMLObject(t, base, 0);
UMLClassifier *parent = ns->asUMLClassifier();
ns = Import_Utils::createUMLObject(t, name, currentScope(), m_comment);
if (isExtension) {
@@ -439,7 +439,7 @@ bool AdaImport::parseStmt()
uError() << "end: expecting \"record\" at "
<< m_source[m_srcIndex];
}
- m_klass = NULL;
+ m_klass = 0;
} else if (scopeIndex()) {
if (advance() != QLatin1String(";")) {
QString scopeName = currentScope()->fullyQualifiedName();
@@ -472,8 +472,8 @@ bool AdaImport::parseStmt()
skipStmt();
return true;
}
- UMLClassifier *klass = NULL;
- UMLOperation *op = NULL;
+ UMLClassifier *klass = 0;
+ UMLOperation *op = 0;
const uint MAX_PARNAMES = 16;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != QLatin1String(")")) {
QString parName[MAX_PARNAMES];
@@ -514,7 +514,7 @@ bool AdaImport::parseStmt()
}
typeName.remove(QLatin1String("Standard."), Qt::CaseInsensitive);
typeName = expand(typeName);
- if (op == NULL) {
+ if (op == 0) {
// In Ada, the first parameter indicates the class.
UMLObject *type = Import_Utils::createUMLObject(UMLObject::ot_Class, typeName, currentScope());
UMLObject::ObjectType t = type->baseType();
@@ -555,7 +555,7 @@ bool AdaImport::parseStmt()
bool isAbstract = false;
if (advance() == QLatin1String("is") && advance() == QLatin1String("abstract"))
isAbstract = true;
- if (klass != NULL && op != NULL)
+ if (klass != 0 && op != 0)
Import_Utils::insertMethod(klass, op, m_currentAccess, returnType,
false, isAbstract, false, false, m_comment);
skipStmt();
@@ -595,7 +595,7 @@ bool AdaImport::parseStmt()
return true;
}
// At this point we're only interested in attribute declarations.
- if (m_klass == NULL || keyword == QLatin1String("null")) {
+ if (m_klass == 0 || keyword == QLatin1String("null")) {
skipStmt();
return true;
}
diff --git a/umbrello/codeimport/csharp/csharpimport.cpp b/umbrello/codeimport/csharp/csharpimport.cpp
index 5b5e117..ae3f5da 100644
--- a/umbrello/codeimport/csharp/csharpimport.cpp
+++ b/umbrello/codeimport/csharp/csharpimport.cpp
@@ -204,7 +204,7 @@ UMLObject* CSharpImport::resolveClass(const QString& className)
// we need to set the package for the class that will be resolved
// start at the root package
UMLPackage *parent = 0;
- UMLPackage *current = NULL;
+ UMLPackage *current = 0;
for (QStringList::Iterator it = split.begin(); it != split.end(); ++it) {
QString name = (*it);
@@ -223,7 +223,7 @@ UMLObject* CSharpImport::resolveClass(const QString& className)
} // if file exists
} // if import matches
} //foreach import
- return NULL; // no match
+ return 0; // no match
}
/**
@@ -366,7 +366,7 @@ bool CSharpImport::parseStmt()
QString typeName = m_source[m_srcIndex];
typeName = joinTypename(typeName);
// At this point we need a class.
- if (m_klass == NULL) {
+ if (m_klass == 0) {
uError() << "no class set for " << typeName;
return false;
}
diff --git a/umbrello/codeimport/idlimport.cpp b/umbrello/codeimport/idlimport.cpp
index 728ec58..33a2a0f 100644
--- a/umbrello/codeimport/idlimport.cpp
+++ b/umbrello/codeimport/idlimport.cpp
@@ -410,7 +410,7 @@ bool IDLImport::parseStmt()
return false;
}
// At this point we most definitely need a class.
- if (m_klass == NULL) {
+ if (m_klass == 0) {
uError() << "importIDL: no class set for " << name;
return false;
}
diff --git a/umbrello/codeimport/import_utils.cpp b/umbrello/codeimport/import_utils.cpp
index e28832d..1871be6 100644
--- a/umbrello/codeimport/import_utils.cpp
+++ b/umbrello/codeimport/import_utils.cpp
@@ -67,7 +67,7 @@ bool bNewUMLObjectWasCreated = false;
* Related classifier for creation of dependencies on template
* parameters in createUMLObject().
*/
-UMLClassifier * gRelatedClassifier = NULL;
+UMLClassifier * gRelatedClassifier = 0;
/**
* On encountering a scoped typename string where the scopes
@@ -188,9 +188,9 @@ UMLObject *createUMLObject(UMLObject::ObjectType type,
QString name = inName;
UMLDoc *umldoc = UMLApp::app()->document();
UMLFolder *logicalView = umldoc->rootFolder(Uml::ModelType::Logical);
- if (parentPkg == NULL) {
+ if (parentPkg == 0) {
// DEBUG(DBG_SRC) << "Import_Utils::createUMLObject(" << name
- // << "): parentPkg is NULL, assuming Logical View";
+ // << "): parentPkg is 0, assuming Logical View";
parentPkg = logicalView;
} else if (parentPkg->baseType() == UMLObject::ot_Artifact) {
DEBUG(DBG_SRC) << "Import_Utils::createUMLObject(" << name
@@ -213,7 +213,7 @@ UMLObject *createUMLObject(UMLObject::ObjectType type,
bPutAtGlobalScope = false;
}
}
- if (o == NULL) {
+ if (o == 0) {
// Strip possible adornments and look again.
const bool isConst = name.contains(QRegExp(QLatin1String("^const ")));
name.remove(QRegExp(QLatin1String("^const\\s+")));
@@ -224,7 +224,7 @@ UMLObject *createUMLObject(UMLObject::ObjectType type,
typeName.remove(QRegExp(QLatin1String("[^\\w:\\. ].*$")));
typeName = typeName.simplified();
UMLObject *origType = umldoc->findUMLObject(typeName, UMLObject::ot_UMLObject, parentPkg);
- if (origType == NULL) {
+ if (origType == 0) {
// Still not found. Create the stripped down type.
if (bPutAtGlobalScope)
parentPkg = logicalView;
@@ -276,7 +276,7 @@ UMLObject *createUMLObject(UMLObject::ObjectType type,
o = Object_Factory::createUMLObject(UMLObject::ot_Datatype, name,
umldoc->datatypeFolder(),
false); //solicitNewName
- UMLDatatype *dt = o ? o->asUMLDatatype() : NULL;
+ UMLDatatype *dt = o ? o->asUMLDatatype() : 0;
UMLClassifier *c = origType->asUMLClassifier();
if (dt && c)
dt->setOriginType(c);
@@ -315,7 +315,7 @@ UMLObject *createUMLObject(UMLObject::ObjectType type,
if (!stereotype.isEmpty()) {
o->setStereotype(stereotype);
}
- if (gRelatedClassifier == NULL || gRelatedClassifier == o)
+ if (gRelatedClassifier == 0 || gRelatedClassifier == o)
return o;
QRegExp templateInstantiation(QLatin1String("^[\\w:\\.]+\\s*<(.*)>"));
int pos = templateInstantiation.indexIn(name);
@@ -329,7 +329,7 @@ UMLObject *createUMLObject(UMLObject::ObjectType type,
QStringList::ConstIterator end(params.end());
for (QStringList::ConstIterator it(params.begin()); it != end; ++it) {
UMLObject *p = umldoc->findUMLObject(*it, UMLObject::ot_UMLObject, parentPkg);
- if (p == NULL || p->isUMLDatatype())
+ if (p == 0 || p->isUMLDatatype())
continue;
const Uml::AssociationType::Enum at = Uml::AssociationType::Dependency;
UMLAssociation *assoc = umldoc->findAssociation(at, gRelatedClassifier, p);
@@ -339,7 +339,7 @@ UMLObject *createUMLObject(UMLObject::ObjectType type,
assoc->setUMLPackage(umldoc->rootFolder(Uml::ModelType::Logical));
umldoc->addAssociation(assoc);
}
- if (o == NULL) {
+ if (o == 0) {
uError() << "is NULL!";
}
return o;
@@ -377,7 +377,7 @@ UMLObject* insertAttribute(UMLClassifier *owner,
(ot == UMLObject::ot_Interface && pl == Uml::ProgrammingLanguage::Java))) {
DEBUG(DBG_SRC) << "insertAttribute: Don not know what to do with "
<< owner->name() << " (object type " << UMLObject::toString(ot) << ")";
- return NULL;
+ return 0;
}
UMLObject *o = owner->findChildObject(name, UMLObject::ot_Attribute);
if (o) {
@@ -405,11 +405,11 @@ UMLObject* insertAttribute(UMLClassifier *owner, Uml::Visibility::Enum scope,
bool isStatic /* =false */)
{
UMLObject *attrType = owner->findTemplate(type);
- if (attrType == NULL) {
+ if (attrType == 0) {
bPutAtGlobalScope = true;
gRelatedClassifier = owner;
attrType = createUMLObject(UMLObject::ot_UMLObject, type, owner);
- gRelatedClassifier = NULL;
+ gRelatedClassifier = 0;
bPutAtGlobalScope = false;
}
return insertAttribute (owner, scope, name,
@@ -448,11 +448,11 @@ void insertMethod(UMLClassifier *klass, UMLOperation* &op,
op->setType(klass);
} else {
UMLObject *typeObj = klass->findTemplate(type);
- if (typeObj == NULL) {
+ if (typeObj == 0) {
bPutAtGlobalScope = true;
gRelatedClassifier = klass;
typeObj = createUMLObject(UMLObject::ot_UMLObject, type, klass);
- gRelatedClassifier = NULL;
+ gRelatedClassifier = 0;
bPutAtGlobalScope = false;
op->setType(typeObj);
}
@@ -513,11 +513,11 @@ UMLAttribute* addMethodParameter(UMLOperation *method,
{
UMLClassifier *owner = method->umlParent()->asUMLClassifier();
UMLObject *typeObj = owner->findTemplate(type);
- if (typeObj == NULL) {
+ if (typeObj == 0) {
bPutAtGlobalScope = true;
gRelatedClassifier = owner;
typeObj = createUMLObject(UMLObject::ot_UMLObject, type, owner);
- gRelatedClassifier = NULL;
+ gRelatedClassifier = 0;
bPutAtGlobalScope = false;
}
UMLAttribute *attr = Object_Factory::createAttribute(method, name, typeObj);
@@ -630,7 +630,7 @@ bool isDatatype(const QString& name, UMLPackage *parentPkg)
{
UMLDoc *umldoc = UMLApp::app()->document();
UMLObject * o = umldoc->findUMLObject(name, UMLObject::ot_Datatype, parentPkg);
- return (o!=NULL);
+ return (o != 0);
}
/**
diff --git a/umbrello/codeimport/import_utils.h b/umbrello/codeimport/import_utils.h
index 287051e..9327cee 100644
--- a/umbrello/codeimport/import_utils.h
+++ b/umbrello/codeimport/import_utils.h
@@ -31,12 +31,12 @@ class UMLScene;
namespace Import_Utils {
UMLObject *createArtifact(const QString& name,
- UMLPackage *parentPkg = NULL,
+ UMLPackage *parentPkg = 0,
const QString &comment = QString());
UMLObject* createUMLObject(UMLObject::ObjectType type,
const QString& name,
- UMLPackage *parentPkg = NULL,
+ UMLPackage *parentPkg = 0,
const QString& comment = QString(),
const QString& stereotype = QString(),
bool searchInParentPackageOnly = false);
@@ -85,7 +85,7 @@ namespace Import_Utils {
bool newUMLObjectWasCreated();
- bool isDatatype(const QString& name, UMLPackage *parentPkg = NULL);
+ bool isDatatype(const QString& name, UMLPackage *parentPkg = 0);
bool importStackTrace(const QString &fileName, UMLScene *scene);
} // end namespace Import_Utils
diff --git a/umbrello/codeimport/javaimport.cpp b/umbrello/codeimport/javaimport.cpp
index f3404df..5139655 100644
--- a/umbrello/codeimport/javaimport.cpp
+++ b/umbrello/codeimport/javaimport.cpp
@@ -199,7 +199,7 @@ UMLObject* JavaImport::resolveClass (const QString& className)
// in case the path does not fit into the package hierachy
// we cannot check the imports
if (dirsInPackageCount >= file.size())
- return NULL;
+ return 0;
for (int count=0; count < dirsInPackageCount; ++count) {
// pop off one by one the directories, until only the source root remains
@@ -224,7 +224,7 @@ UMLObject* JavaImport::resolveClass (const QString& className)
// we need to set the package for the class that will be resolved
// start at the root package
UMLPackage *parent = 0;
- UMLPackage *current = NULL;
+ UMLPackage *current = 0;
for (QStringList::Iterator it = split.begin(); it != split.end(); ++it) {
QString name = (*it);
@@ -243,7 +243,7 @@ UMLObject* JavaImport::resolveClass (const QString& className)
} // if file exists
} // if import matches
} //foreach import
- return NULL; // no match
+ return 0; // no match
}
/**
@@ -506,7 +506,7 @@ bool JavaImport::parseStmt()
QString typeName = m_source[m_srcIndex];
typeName = joinTypename(typeName);
// At this point we need a class.
- if (m_klass == NULL) {
+ if (m_klass == 0) {
uError() << "importJava: no class set for " << typeName;
return false;
}
diff --git a/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp b/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
index 446af76..0ad63e6 100644
--- a/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
+++ b/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
@@ -52,8 +52,8 @@ CppTree2Uml::~CppTree2Uml()
void CppTree2Uml::clear()
{
m_currentScope.clear();
- m_currentNamespace[0] = NULL; // index 0 is reserved (always NULL)
- m_currentClass[0] = NULL; // index 0 is reserved (always NULL)
+ m_currentNamespace[0] = 0; // index 0 is reserved (always 0)
+ m_currentClass[0] = 0; // index 0 is reserved (always 0)
m_nsCnt = 0;
m_clsCnt = 0;
@@ -186,7 +186,7 @@ void CppTree2Uml::parseTypedef(TypedefAST* ast)
void CppTree2Uml::parseTemplateDeclaration(TemplateDeclarationAST* ast)
{
TemplateParameterListAST* parmListAST = ast->templateParameterList();
- if (parmListAST == NULL)
+ if (parmListAST == 0)
return;
QList<TemplateParameterAST*> parmList = parmListAST->templateParameterList();
for (int i = 0; i < parmList.size(); ++i) {
@@ -197,7 +197,7 @@ void CppTree2Uml::parseTemplateDeclaration(TemplateDeclarationAST* ast)
NameAST* nameNode = typeParmNode->name();
if (nameNode) {
QString typeName = nameNode->unqualifiedName()->text();
- Model_Utils::NameAndType nt(typeName, NULL);
+ Model_Utils::NameAndType nt(typeName, 0);
m_templateParams.append(nt);
} else {
uError() << "nameNode is NULL";
@@ -207,7 +207,7 @@ void CppTree2Uml::parseTemplateDeclaration(TemplateDeclarationAST* ast)
ParameterDeclarationAST* valueNode = tmplParmNode->typeValueParameter();
if (valueNode) {
TypeSpecifierAST* typeSpec = valueNode->typeSpec();
- if (typeSpec == NULL) {
+ if (typeSpec == 0) {
uError() << "typeSpec is NULL";
continue;
}
@@ -216,7 +216,7 @@ void CppTree2Uml::parseTemplateDeclaration(TemplateDeclarationAST* ast)
m_currentNamespace[m_nsCnt]);
DeclaratorAST* declNode = valueNode->declarator();
NameAST* nameNode = declNode->declaratorId();
- if (nameNode == NULL) {
+ if (nameNode == 0) {
uError() << "CppTree2Uml::parseTemplateDeclaration(value):"
<< " nameNode is NULL";
continue;
@@ -302,7 +302,7 @@ void CppTree2Uml::parseFunctionDefinition(FunctionDefinitionAST* ast)
uDebug() << id;
UMLClassifier *c = m_currentClass[m_clsCnt];
- if (c == NULL) {
+ if (c == 0) {
uDebug() << id << ": need a surrounding class.";
return;
}
@@ -425,7 +425,7 @@ void CppTree2Uml::parseClassSpecifier(ClassSpecifierAST* ast)
void CppTree2Uml::parseEnumSpecifier(EnumSpecifierAST* ast)
{
NameAST *nameNode = ast->name();
- if (nameNode == NULL)
+ if (nameNode == 0)
return; // skip constants
QString typeName = nameNode->unqualifiedName()->text().trimmed();
if (typeName.isEmpty())
@@ -501,7 +501,7 @@ void CppTree2Uml::parseDeclaration2(GroupAST* funSpec, GroupAST* storageSpec,
}
UMLClassifier *c = m_currentClass[m_clsCnt];
- if (c == NULL) {
+ if (c == 0) {
uDebug() << id << ": need a surrounding class.";
return;
}
@@ -572,7 +572,7 @@ void CppTree2Uml::parseFunctionDeclaration(GroupAST* funSpec, GroupAST* storageS
QString id = d->declaratorId()->unqualifiedName()->text();
UMLClassifier *c = m_currentClass[m_clsCnt];
- if (c == NULL) {
+ if (c == 0) {
uDebug() << id << ": need a surrounding class.";
return;
}
@@ -647,7 +647,7 @@ void CppTree2Uml::parseBaseClause(BaseClauseAST * baseClause, UMLClassifier* kla
for (int i = 0; i < l.size(); ++i) {
BaseSpecifierAST* baseSpecifier = l.at(i);
- if (baseSpecifier->name() == NULL) {
+ if (baseSpecifier->name() == 0) {
uDebug() << "baseSpecifier->name() is NULL";
continue;
}
diff --git a/umbrello/codeimport/nativeimportbase.cpp b/umbrello/codeimport/nativeimportbase.cpp
index 1f5791e..b9b9f21 100644
--- a/umbrello/codeimport/nativeimportbase.cpp
+++ b/umbrello/codeimport/nativeimportbase.cpp
@@ -475,7 +475,7 @@ bool NativeImportBase::parseFile(const QString& filename)
QLatin1String(" / lines: ") + QString::number(lineCount));
file.close();
// Parse the QStringList m_source.
- m_klass = NULL;
+ m_klass = 0;
m_currentAccess = Uml::Visibility::Public;
m_scope.clear();
pushScope(0); // index 0 is reserverd for the global scope
diff --git a/umbrello/codeimport/pascalimport.cpp b/umbrello/codeimport/pascalimport.cpp
index 376df57..ebdd91c 100644
--- a/umbrello/codeimport/pascalimport.cpp
+++ b/umbrello/codeimport/pascalimport.cpp
@@ -217,7 +217,7 @@ bool PascalImport::parseStmt()
}
if (keyword == QLatin1String("end")) {
if (m_klass) {
- m_klass = NULL;
+ m_klass = 0;
} else if (scopeIndex()) {
popScope();
m_currentAccess = Uml::Visibility::Public;
@@ -229,7 +229,7 @@ bool PascalImport::parseStmt()
}
if (keyword == QLatin1String("function") || keyword == QLatin1String("procedure") ||
keyword == QLatin1String("constructor") || keyword == QLatin1String("destructor")) {
- if (m_klass == NULL) {
+ if (m_klass == 0) {
// Unlike a Pascal unit, a UML package does not support subprograms.
// In order to map those, we would need to create a UML class with
// stereotype <<utility>> for the unit, http://bugs.kde.org/89167
@@ -311,7 +311,7 @@ bool PascalImport::parseStmt()
skipStmt();
return true;
}
- if (m_klass == NULL) {
+ if (m_klass == 0) {
const QString& name = m_source[m_srcIndex];
QString nextToken = advance();
if (nextToken != QLatin1String("=")) {
@@ -360,7 +360,7 @@ bool PascalImport::parseStmt()
advance();
do {
QString base = advance();
- UMLObject *ns = Import_Utils::createUMLObject(UMLObject::ot_Class, base, NULL);
+ UMLObject *ns = Import_Utils::createUMLObject(UMLObject::ot_Class, base, 0);
UMLClassifier *parent = ns->asUMLClassifier();
m_comment.clear();
Import_Utils::createGeneralization(klass, parent);
@@ -403,7 +403,7 @@ bool PascalImport::parseStmt()
return false;
}
// At this point we need a class because we're expecting its member attributes.
- if (m_klass == NULL) {
+ if (m_klass == 0) {
uDebug() << "importPascal: skipping " << m_source[m_srcIndex];
skipStmt();
return true;
diff --git a/umbrello/codeimport/pythonimport.cpp b/umbrello/codeimport/pythonimport.cpp
index d2032c4..f3f9450 100644
--- a/umbrello/codeimport/pythonimport.cpp
+++ b/umbrello/codeimport/pythonimport.cpp
@@ -302,7 +302,7 @@ bool PythonImport::parseStmt()
return true;
}
if (keyword == QLatin1String("def")) {
- if (m_klass == NULL) {
+ if (m_klass == 0) {
// skip functions outside of a class
skipBody();
return true;
diff --git a/umbrello/dialogs/codeeditor.cpp b/umbrello/dialogs/codeeditor.cpp
index 0ec9645..6a31592 100644
--- a/umbrello/dialogs/codeeditor.cpp
+++ b/umbrello/dialogs/codeeditor.cpp
@@ -675,7 +675,7 @@ void CodeEditor::slotChangeSelectedBlockView()
void CodeEditor::slotChangeSelectedBlockCommentView()
{
TextBlock * tb = m_selectedTextBlock;
- CodeBlockWithComments * cb = NULL;
+ CodeBlockWithComments * cb = 0;
if (tb && (cb = dynamic_cast<CodeBlockWithComments*>(tb))) {
CodeComment* codcom = cb->getComment();
if (codcom) {
diff --git a/umbrello/dialogs/dialog_utils.cpp b/umbrello/dialogs/dialog_utils.cpp
index f269055..1b9bcb4 100644
--- a/umbrello/dialogs/dialog_utils.cpp
+++ b/umbrello/dialogs/dialog_utils.cpp
@@ -64,7 +64,7 @@ KLineEdit* makeLabeledEditField(QGridLayout* layout, int row,
*
* @param targetWidget By-reference pointer to the widget to request the name for.
* The widget may be deallocated, and the pointer returned
- * set to NULL, if the user presses Cancel in the dialog.
+ * set to 0, if the user presses Cancel in the dialog.
* @param dialogTitle Title of the dialog.
* @param dialogPrompt Prompt of the dialog.
* @param defaultName Default value of the name field.
@@ -88,7 +88,7 @@ void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
}
else {
delete targetWidget;
- targetWidget = NULL;
+ targetWidget = 0;
}
}
diff --git a/umbrello/dialogs/pages/associationgeneralpage.cpp b/umbrello/dialogs/pages/associationgeneralpage.cpp
index 76be418..fd72083 100644
--- a/umbrello/dialogs/pages/associationgeneralpage.cpp
+++ b/umbrello/dialogs/pages/associationgeneralpage.cpp
@@ -114,7 +114,7 @@ void AssociationGeneralPage::constructWidget()
if (umlAssoc) {
// stereotype checkbox
m_pStereoChkB = new QCheckBox(i18n("Stereotype"), nameAndTypeGB);
- m_pStereoChkB->setChecked(umlAssoc->umlStereotype() != NULL);
+ m_pStereoChkB->setChecked(umlAssoc->umlStereotype() != 0);
connect(m_pStereoChkB, SIGNAL(stateChanged(int)), this, SLOT(slotStereoCheckboxChanged(int)));
m_pNameAndTypeLayout->addWidget(m_pStereoChkB, 0, 2);
}
@@ -194,7 +194,7 @@ void AssociationGeneralPage::constructWidget()
void AssociationGeneralPage::slotStereoCheckboxChanged(int state)
{
- QWidget *nameInputWidget = NULL;
+ QWidget *nameInputWidget = 0;
if (state) {
m_pAssocNameLE->hide();
m_pNameAndTypeLayout->removeWidget(m_pAssocNameLE);
diff --git a/umbrello/dialogs/pages/associationrolepage.cpp b/umbrello/dialogs/pages/associationrolepage.cpp
index 1171887..bd33d5b 100644
--- a/umbrello/dialogs/pages/associationrolepage.cpp
+++ b/umbrello/dialogs/pages/associationrolepage.cpp
@@ -110,13 +110,13 @@ void AssociationRolePage::constructWidget()
//
// Rolename A
- QLabel *pRoleAL = NULL;
+ QLabel *pRoleAL = 0;
Dialog_Utils::makeLabeledEditField(propsALayout, 0,
pRoleAL, i18n("Rolename:"),
m_pRoleALE, nameA);
// Multi A
- QLabel *pMultiAL = NULL;
+ QLabel *pMultiAL = 0;
pMultiAL = new QLabel(i18n("Multiplicity:"), propsAGB);
m_pMultiACB = new KComboBox(propsAGB);
m_pMultiACB->addItems(multiplicities);
@@ -159,13 +159,13 @@ void AssociationRolePage::constructWidget()
}
// Rolename B
- QLabel * pRoleBL = NULL;
+ QLabel * pRoleBL = 0;
Dialog_Utils::makeLabeledEditField(propsBLayout, 0,
pRoleBL, i18n("Rolename:"),
m_pRoleBLE, nameB);
// Multi B
- QLabel *pMultiBL = NULL;
+ QLabel *pMultiBL = 0;
pMultiBL = new QLabel(i18n("Multiplicity:"), propsBGB);
m_pMultiBCB = new KComboBox(propsBGB);
m_pMultiBCB->addItems(multiplicities);
diff --git a/umbrello/dialogs/pages/classifierlistpage.cpp b/umbrello/dialogs/pages/classifierlistpage.cpp
index 162174a..f701453 100644
--- a/umbrello/dialogs/pages/classifierlistpage.cpp
+++ b/umbrello/dialogs/pages/classifierlistpage.cpp
@@ -351,7 +351,7 @@ void ClassifierListPage::slotActivateItem(QListWidgetItem* item)
UMLClassifierListItemList itemList = getItemList();
int itemIndex;
- if (item == NULL) {
+ if (item == 0) {
if (m_pItemListLB->count() == 0) {
enableWidgets(false);
m_pOldListItem = 0;
@@ -402,7 +402,7 @@ void ClassifierListPage::slotListItemCreated(UMLObject* object)
return;
}
UMLClassifierListItem *listItem = object->asUMLClassifierListItem();
- if (listItem == NULL) {
+ if (listItem == 0) {
return;
}
@@ -553,7 +553,7 @@ void ClassifierListPage::slotTopClicked()
//shouldn't occur, but just in case
if(count <= 1 || index <= 0)
return;
- m_pOldListItem = NULL;
+ m_pOldListItem = 0;
//swap the text around in the ListBox
QString currentString = m_pItemListLB->item(index)->text();
@@ -587,7 +587,7 @@ void ClassifierListPage::slotUpClicked()
//shouldn't occur, but just in case
if (count <= 1 || index <= 0)
return;
- m_pOldListItem = NULL;
+ m_pOldListItem = 0;
//swap the text around in the ListBox
QString aboveString = m_pItemListLB->item(index - 1)->text();
@@ -624,7 +624,7 @@ void ClassifierListPage::slotDownClicked()
//shouldn't occur, but just in case
if (count <= 1 || index >= count - 1 || index == -1)
return;
- m_pOldListItem = NULL;
+ m_pOldListItem = 0;
//swap the text around in the ListBox
QString belowString = m_pItemListLB->item(index + 1)->text();
@@ -660,7 +660,7 @@ void ClassifierListPage::slotBottomClicked()
//shouldn't occur, but just in case
if (count <= 1 || index >= count - 1 || index == -1)
return;
- m_pOldListItem = NULL;
+ m_pOldListItem = 0;
//swap the text around in the ListBox
QString currentString = m_pItemListLB->item(index)->text();
@@ -724,7 +724,7 @@ void ClassifierListPage::slotDelete()
m_doc->removeUMLObject(selectedItem);
m_pOldListItem = 0;
- slotActivateItem(NULL);
+ slotActivateItem(0);
}
}
@@ -796,7 +796,7 @@ bool ClassifierListPage::addClassifier(UMLClassifierListItem* listitem, int posi
uError() << "Dynamic cast to UMLAttribute failed for" << listitem->name();
return false;
}
- return m_pClassifier->addAttribute(att, NULL, position);
+ return m_pClassifier->addAttribute(att, 0, position);
}
case UMLObject::ot_Operation: {
UMLOperation *op = listitem->asUMLOperation();
diff --git a/umbrello/dialogs/pages/classoptionspage.cpp b/umbrello/dialogs/pages/classoptionspage.cpp
index f2f5b32..26f744d 100644
--- a/umbrello/dialogs/pages/classoptionspage.cpp
+++ b/umbrello/dialogs/pages/classoptionspage.cpp
@@ -384,16 +384,16 @@ void ClassOptionsPage::applyScene()
*/
void ClassOptionsPage::init()
{
- m_scene = NULL;
- m_options = NULL;
- m_pWidget = NULL;
- m_showStereotypeCB = NULL;
- m_showAttsCB = NULL;
- m_showAttSigCB = NULL;
- m_showAttribAssocsCB = NULL;
- m_showDocumentationCB = NULL;
- m_showPublicOnlyCB = NULL;
- m_drawAsCircleCB = NULL;
+ m_scene = 0;
+ m_options = 0;
+ m_pWidget = 0;
+ m_showStereotypeCB = 0;
+ m_showAttsCB = 0;
+ m_showAttSigCB = 0;
+ m_showAttribAssocsCB = 0;
+ m_showDocumentationCB = 0;
+ m_showPublicOnlyCB = 0;
+ m_drawAsCircleCB = 0;
}
/**
diff --git a/umbrello/dialogs/pages/constraintlistpage.cpp b/umbrello/dialogs/pages/constraintlistpage.cpp
index 6f9cb08..1620f46 100644
--- a/umbrello/dialogs/pages/constraintlistpage.cpp
+++ b/umbrello/dialogs/pages/constraintlistpage.cpp
@@ -130,12 +130,12 @@ void ConstraintListPage::slotNewPrimaryKeyConstraint()
// set the last object created as Primary Key
UMLEntity* ent = m_pClassifier->asUMLEntity();
- if (ent == NULL) {
+ if (ent == 0) {
uError() << "Could not set Primary Key. Entity Value is Null";
return;
}
- if (m_pLastObjectCreated!=NULL) {
+ if (m_pLastObjectCreated != 0) {
m_bSigWaiting = true;
ent->setAsPrimaryKey(m_pLastObjectCreated->asUMLUniqueConstraint());
m_itemType = UMLObject::ot_EntityConstraint;
diff --git a/umbrello/dialogs/pages/packagecontentspage.cpp b/umbrello/dialogs/pages/packagecontentspage.cpp
index 5af9ecb..1fd005f 100644
--- a/umbrello/dialogs/pages/packagecontentspage.cpp
+++ b/umbrello/dialogs/pages/packagecontentspage.cpp
@@ -94,7 +94,7 @@ void PackageContentsPage::fillListBox()
m_contentLW->clear();
UMLObjectList contents = m_package->containedObjects();
UMLObjectListIt objList_it(contents);
- UMLObject* umlo = NULL;
+ UMLObject* umlo = 0;
while (objList_it.hasNext()) {
umlo = objList_it.next();
uIgnoreZeroPointer(umlo);
diff --git a/umbrello/dialogs/parameterpropertiesdialog.cpp b/umbrello/dialogs/parameterpropertiesdialog.cpp
index a6468b4..3942579 100644
--- a/umbrello/dialogs/parameterpropertiesdialog.cpp
+++ b/umbrello/dialogs/parameterpropertiesdialog.cpp
@@ -176,7 +176,7 @@ bool ParameterPropertiesDialog::validate()
bool ParameterPropertiesDialog::apply()
{
- if (m_pAtt != NULL) {
+ if (m_pAtt != 0) {
m_pAtt->setName(getName()); // set the name
m_pAtt->setParmKind(getParmKind()); // set the direction
diff --git a/umbrello/dialogs/umlforeignkeyconstraintdialog.cpp b/umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
index 3191106..40e1a5a 100644
--- a/umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
+++ b/umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
@@ -162,7 +162,7 @@ bool UMLForeignKeyConstraintDialog::apply()
UMLEntity* ue = uo->asUMLEntity();
- if (ue == NULL) {
+ if (ue == 0) {
uDebug() << " Could not find UML Entity with name " << entityName;
return false;
}
@@ -256,7 +256,7 @@ void UMLForeignKeyConstraintDialog::setupGeneralPage()
UMLEntity* referencedEntity = m_pForeignKeyConstraint->getReferencedEntity();
int index;
- if (referencedEntity != NULL) {
+ if (referencedEntity != 0) {
index = m_GeneralWidgets.referencedEntityCB->findText(referencedEntity->name());
if (index != -1)
m_GeneralWidgets.referencedEntityCB->setCurrentIndex(index);
@@ -470,7 +470,7 @@ void UMLForeignKeyConstraintDialog::slotResetWidgetState()
}
// get index of selected Attribute in List Box
- if (m_ColumnWidgets.mappingTW->currentItem() == NULL) {
+ if (m_ColumnWidgets.mappingTW->currentItem() == 0) {
m_ColumnWidgets.removePB->setEnabled(false);
}
}
diff --git a/umbrello/dialogs/widgets/umldatatypewidget.cpp b/umbrello/dialogs/widgets/umldatatypewidget.cpp
index db97e37..27b8bed 100644
--- a/umbrello/dialogs/widgets/umldatatypewidget.cpp
+++ b/umbrello/dialogs/widgets/umldatatypewidget.cpp
@@ -150,7 +150,7 @@ bool UMLDatatypeWidget::applyAttribute()
}
UMLClassifier *classifier = obj->asUMLClassifier();
- if (classifier == NULL) {
+ if (classifier == 0) {
Uml::ProgrammingLanguage::Enum pl = UMLApp::app()->activeLanguage();
// Import_Utils does not handle creating a new object with empty name
// string well. Use Object_Factory in those cases.
@@ -163,7 +163,7 @@ bool UMLDatatypeWidget::applyAttribute()
// and java package than Object_Factory::createUMLObject
Import_Utils::setRelatedClassifier(m_parent);
obj = Import_Utils::createUMLObject(UMLObject::ot_UMLObject, typeName);
- Import_Utils::setRelatedClassifier(NULL);
+ Import_Utils::setRelatedClassifier(0);
} else {
// If it's obviously a pointer type (C++) then create a datatype.
// Else we don't know what it is so as a compromise create a class.
@@ -172,7 +172,7 @@ bool UMLDatatypeWidget::applyAttribute()
: UMLObject::ot_Class);
obj = Object_Factory::createUMLObject(ot, typeName);
}
- if (obj == NULL)
+ if (obj == 0)
return false;
classifier = obj->asUMLClassifier();
}
@@ -193,14 +193,14 @@ bool UMLDatatypeWidget::applyEntityAttribute()
}
UMLObject *obj = pDoc->findUMLObject(typeName);
UMLClassifier *classifier = obj->asUMLClassifier();
- if (classifier == NULL) {
+ if (classifier == 0) {
// If it's obviously a pointer type (C++) then create a datatype.
// Else we don't know what it is so as a compromise create a class.
UMLObject::ObjectType ot =
(typeName.contains(QChar::fromLatin1('*')) ? UMLObject::ot_Datatype
: UMLObject::ot_Class);
obj = Object_Factory::createUMLObject(ot, typeName);
- if (obj == NULL)
+ if (obj == 0)
return false;
classifier = obj->asUMLClassifier();
}
@@ -226,7 +226,7 @@ bool UMLDatatypeWidget::applyParameter()
{
// set the type name
QString typeName = m_comboBox->currentText();
- if (m_parent == NULL) {
+ if (m_parent == 0) {
uError() << "grandparent of " << m_attribute->name() << " is not a UMLClassifier";
} else {
UMLTemplate *tmplParam = m_parent->findTemplate(typeName);
@@ -392,7 +392,7 @@ void UMLDatatypeWidget::insertTypesSortedParameter(const QString& type)
QStringList types;
// add template parameters
UMLClassifier *pConcept = m_parent->asUMLClassifier();
- if (pConcept == NULL) {
+ if (pConcept == 0) {
uError() << "ParameterPropertiesDialog: grandparent of " << m_attribute->name()
<< " is not a UMLClassifier";
} else {
diff --git a/umbrello/dialogs/widgets/umlpackagewidget.cpp b/umbrello/dialogs/widgets/umlpackagewidget.cpp
index bc24c12..b62ed37 100644
--- a/umbrello/dialogs/widgets/umlpackagewidget.cpp
+++ b/umbrello/dialogs/widgets/umlpackagewidget.cpp
@@ -53,7 +53,7 @@ UMLPackageWidget::UMLPackageWidget(UMLObject *o, QWidget *parent) :
UMLPackage* folderLogicalView =
UMLApp::app()->document()->rootFolder(Uml::ModelType::Logical)->asUMLPackage();
- if (parentPackage == NULL ||
+ if (parentPackage == 0 ||
parentPackage == folderLogicalView) {
m_editField->setEditText(QString());
}
@@ -86,10 +86,10 @@ void UMLPackageWidget::addToLayout(QGridLayout *layout, int row)
void UMLPackageWidget::apply()
{
QString packageName = m_editField->currentText().trimmed();
- UMLObject* newPackage = NULL;
+ UMLObject* newPackage = 0;
if (!packageName.isEmpty()) {
- if ((newPackage = UMLApp::app()->document()->findUMLObject(packageName, UMLObject::ot_Package)) == NULL) {
+ if ((newPackage = UMLApp::app()->document()->findUMLObject(packageName, UMLObject::ot_Package)) == 0) {
newPackage = Import_Utils::createUMLObject(UMLObject::ot_Package, packageName);
}
} else {
diff --git a/umbrello/docgenerators/docbook2xhtmlgeneratorjob.cpp b/umbrello/docgenerators/docbook2xhtmlgeneratorjob.cpp
index eb2cc0c..42c8153 100644
--- a/umbrello/docgenerators/docbook2xhtmlgeneratorjob.cpp
+++ b/umbrello/docgenerators/docbook2xhtmlgeneratorjob.cpp
@@ -63,12 +63,12 @@ Docbook2XhtmlGeneratorJob::Docbook2XhtmlGeneratorJob(KUrl& docBookUrl, QObject*
void Docbook2XhtmlGeneratorJob::run()
{
UMLDoc* umlDoc = UMLApp::app()->document();
- xsltStylesheetPtr cur = NULL;
+ xsltStylesheetPtr cur = 0;
xmlDocPtr doc, res;
const char *params[16 + 1];
int nbparams = 0;
- params[nbparams] = NULL;
+ params[nbparams] = 0;
umlDoc->writeToStatusBar(i18n("Exporting to XHTML..."));
diff --git a/umbrello/docgenerators/docbookgeneratorjob.cpp b/umbrello/docgenerators/docbookgeneratorjob.cpp
index 9107677..781b1aa 100644
--- a/umbrello/docgenerators/docbookgeneratorjob.cpp
+++ b/umbrello/docgenerators/docbookgeneratorjob.cpp
@@ -70,12 +70,12 @@ void DocbookGeneratorJob::run()
umlDoc->saveToXMI(file); // save the xmi stuff to it
- xsltStylesheetPtr cur = NULL;
+ xsltStylesheetPtr cur = 0;
xmlDocPtr doc, res;
const char *params[16 + 1];
int nbparams = 0;
- params[nbparams] = NULL;
+ params[nbparams] = 0;
#if QT_VERSION >= 0x050000
QString xsltFile(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String("xmi2docbook.xsl")));
diff --git a/umbrello/docgenerators/main.cpp b/umbrello/docgenerators/main.cpp
index 69e2c53..2b46844 100644
--- a/umbrello/docgenerators/main.cpp
+++ b/umbrello/docgenerators/main.cpp
@@ -41,12 +41,12 @@ static const char description[] =
int main(int argc, char *argv[])
{
- xsltStylesheetPtr cur = NULL;
+ xsltStylesheetPtr cur = 0;
xmlDocPtr doc, res;
const char *params[16 + 1];
int nbparams = 0;
- params[nbparams] = NULL;
+ params[nbparams] = 0;
KAboutData aboutData("umbodoc", 0, ki18n("Umbrello UML Modeller autonomous code generator"),
umbrelloVersion(), ki18n(description), KAboutData::License_GPL,
diff --git a/umbrello/import_rose.cpp b/umbrello/import_rose.cpp
index 1f36ec7..9892d75 100644
--- a/umbrello/import_rose.cpp
+++ b/umbrello/import_rose.cpp
@@ -284,7 +284,7 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream)
methodName(QLatin1String("readAttributes"));
if (initialArgs.count() == 0) {
uError() << loc() << "initialArgs is empty";
- return NULL;
+ return 0;
}
PetalNode::NodeType nt;
QString type = shift(initialArgs);
@@ -294,7 +294,7 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream)
nt = PetalNode::nt_list;
else {
uError() << loc() << "unknown node type " << type;
- return NULL;
+ return 0;
}
PetalNode *node = new PetalNode(nt);
bool seenClosing = checkClosing(initialArgs);
@@ -314,7 +314,7 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream)
if (nt == PetalNode::nt_object && !stringOrNodeOpener.contains(QRegExp(QLatin1String("^[A-Za-z]")))) {
uError() << loc() << "unexpected line " << line;
delete node;
- return NULL;
+ return 0;
}
PetalNode::StringOrNode value;
if (nt == PetalNode::nt_object) {
@@ -355,9 +355,9 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream)
value.string = extractValue(tokens, stream);
} else {
value.node = readAttributes(tokens, stream);
- if (value.node == NULL) {
+ if (value.node == 0) {
delete node;
- return NULL;
+ return 0;
}
}
PetalNode::NameValue attr(name, value);
@@ -396,7 +396,7 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream)
*/
UMLPackage* loadFromMDL(QFile& file, UMLPackage *parentPkg /* = 0 */)
{
- if (parentPkg == NULL) {
+ if (parentPkg == 0) {
QString fName = file.fileName();
int lastSlash = fName.lastIndexOf(QLatin1Char('/'));
if (lastSlash > 0) {
@@ -406,7 +406,7 @@ UMLPackage* loadFromMDL(QFile& file, UMLPackage *parentPkg /* = 0 */)
QTextStream stream(&file);
stream.setCodec("ISO 8859-1");
QString line;
- PetalNode *root = NULL;
+ PetalNode *root = 0;
uint nClosures_sav = nClosures;
uint linum_sav = linum;
nClosures = 0;
@@ -494,8 +494,8 @@ UMLPackage* loadFromMDL(QFile& file, UMLPackage *parentPkg /* = 0 */)
file.close();
nClosures = nClosures_sav;
linum = linum_sav;
- if (root == NULL)
- return NULL;
+ if (root == 0)
+ return 0;
if (parentPkg) {
UMLPackage *child = petalTree2Uml(root, parentPkg);
@@ -506,7 +506,7 @@ UMLPackage* loadFromMDL(QFile& file, UMLPackage *parentPkg /* = 0 */)
if (root->name() != QLatin1String("Design")) {
uError() << "expecting root name Design";
delete root;
- return NULL;
+ return 0;
}
Import_Utils::assignUniqueIdOnCreation(false);
UMLDoc *umldoc = UMLApp::app()->document();
diff --git a/umbrello/listpopupmenu.cpp b/umbrello/listpopupmenu.cpp
index 45ec01c..d0a60a3 100644
--- a/umbrello/listpopupmenu.cpp
+++ b/umbrello/listpopupmenu.cpp
@@ -459,7 +459,7 @@ void ListPopupMenu::insertSingleSelectionMenu(WidgetBase* object)
{
PinPortBase *pW = static_cast<PinPortBase*>(object);
FloatingTextWidget *ft = pW->floatingTextWidget();
- if (ft == NULL)
+ if (ft == 0)
m_actions[mt_NameAsTooltip]->setChecked(true);
}
insert(mt_Properties);
@@ -607,7 +607,7 @@ void ListPopupMenu::insertSingleSelectionMenu(WidgetBase* object)
insert(mt_NameAsTooltip, i18n("Name as Tooltip"), CHECKABLE);
PinPortBase *pW = static_cast<PinPortBase*>(object);
FloatingTextWidget *ft = pW->floatingTextWidget();
- if (ft == NULL)
+ if (ft == 0)
m_actions[mt_NameAsTooltip]->setChecked(true);
}
insert(mt_Delete);
@@ -817,7 +817,7 @@ void ListPopupMenu::insert(const MenuType m, QMenu* menu)
void ListPopupMenu::insert(const MenuType m, KMenu* menu)
#endif
{
- Q_ASSERT(menu != NULL);
+ Q_ASSERT(menu != 0);
switch (m) {
case mt_Subsystem:
m_actions[m] = menu->addAction(Icon_Utils::SmallIcon(Icon_Utils::it_Subsystem), i18n("Subsystem"));
@@ -1133,12 +1133,12 @@ void ListPopupMenu::insertSubmodelAction()
return;
}
UMLObject *o = Model_Utils::treeViewGetCurrentObject();
- if (o == NULL) {
+ if (o == 0) {
uError() << " Model_Utils::treeViewGetCurrentObject() returns NULL";
return;
}
UMLFolder *f = o->asUMLFolder();
- if (f == NULL) {
+ if (f == 0) {
uError() << o->name() << " is not a Folder";
return;
}
@@ -2163,7 +2163,7 @@ KMenu* ListPopupMenu::makeCategoryTypeMenu(UMLCategory* category)
*/
QAction* ListPopupMenu::getAction(MenuType idx)
{
- return m_actions.value(idx, NULL);
+ return m_actions.value(idx, 0);
}
// /**
diff --git a/umbrello/model_utils.cpp b/umbrello/model_utils.cpp
index b876708..7f03f23 100644
--- a/umbrello/model_utils.cpp
+++ b/umbrello/model_utils.cpp
@@ -100,7 +100,7 @@ UMLObject* findObjectInList(Uml::ID::Type id, const UMLObjectList& inList)
case UMLObject::ot_Enum:
case UMLObject::ot_Entity:
o = obj->asUMLClassifier()->findChildObjectById(id);
- if (o == NULL &&
+ if (o == 0 &&
(t == UMLObject::ot_Interface || t == UMLObject::ot_Class))
o = ((UMLPackage*)obj)->findObjectById(id);
if (o)
@@ -121,7 +121,7 @@ UMLObject* findObjectInList(Uml::ID::Type id, const UMLObjectList& inList)
break;
}
}
- return NULL;
+ return 0;
}
/**
@@ -141,14 +141,14 @@ UMLObject* findObjectInList(Uml::ID::Type id, const UMLObjectList& inList)
UMLObject* findUMLObject(const UMLObjectList& inList,
const QString& inName,
UMLObject::ObjectType type /* = ot_UMLObject */,
- UMLObject *currentObj /* = NULL */)
+ UMLObject *currentObj /* = 0 */)
{
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
QString name = inName;
const bool atGlobalScope = name.startsWith(QLatin1String("::"));
if (atGlobalScope) {
name = name.mid(2);
- currentObj = NULL;
+ currentObj = 0;
}
QStringList components;
#ifdef TRY_BUGFIX_120682
@@ -172,12 +172,12 @@ UMLObject* findUMLObject(const UMLObjectList& inList,
nameWithoutFirstPrefix = components.join(QLatin1String("::"));
}
if (currentObj) {
- UMLPackage *pkg = NULL;
+ UMLPackage *pkg = 0;
if (currentObj->asUMLClassifierListItem()) {
currentObj = currentObj->umlParent();
}
pkg = currentObj->asUMLPackage();
- if (pkg == NULL || pkg->baseType() == UMLObject::ot_Association)
+ if (pkg == 0 || pkg->baseType() == UMLObject::ot_Association)
pkg = currentObj->umlPackage();
// Remember packages that we've seen - for avoiding cycles.
UMLPackageList seenPkgs;
@@ -293,7 +293,7 @@ UMLObject* findUMLObject(const UMLObjectList& inList,
return findUMLObject(pkg->containedObjects(),
nameWithoutFirstPrefix, type);
}
- return NULL;
+ return 0;
}
/**
@@ -322,7 +322,7 @@ UMLObject* findUMLObjectRaw(const UMLObjectList& inList,
if (obj->name() == name && type == obj->baseType())
return obj;
}
- return NULL;
+ return 0;
}
/**
@@ -330,13 +330,13 @@ UMLObject* findUMLObjectRaw(const UMLObjectList& inList,
*/
UMLPackage* rootPackage(UMLObject* obj)
{
- if (obj == NULL)
- return NULL;
+ if (obj == 0)
+ return 0;
UMLPackage* root = obj->umlPackage();
- if (root == NULL) {
+ if (root == 0) {
root = obj->asUMLPackage();
} else {
- while (root->umlPackage() != NULL) {
+ while (root->umlPackage() != 0) {
root = root->umlPackage();
}
}
@@ -351,7 +351,7 @@ void treeViewAddViews(const UMLViewList& viewList)
{
UMLListView* tree = UMLApp::app()->listView();
foreach (UMLView* v, viewList) {
- if (tree->findItem(v->umlScene()->ID()) != NULL) {
+ if (tree->findItem(v->umlScene()->ID()) != 0) {
continue;
}
tree->createDiagramItem(v);
@@ -428,7 +428,7 @@ UMLPackage* treeViewGetPackageFromCurrent()
parentItem = static_cast<UMLListViewItem*>(parentItem->parent());
}
- return NULL;
+ return 0;
}
/**
@@ -450,10 +450,10 @@ QString treeViewBuildDiagramName(Uml::ID::Type id)
// Relies on the tree structure of the UMLListView. There are a base "Views" folder
// and five children, one for each view type (Logical, use case, components, deployment
// and entity relationship)
- while (listView->rootView(listViewItem->type()) == NULL) {
+ while (listView->rootView(listViewItem->type()) == 0) {
name.insert(0, listViewItem->text(0) + QLatin1Char('/'));
listViewItem = static_cast<UMLListViewItem*>(listViewItem->parent());
- if (listViewItem == NULL)
+ if (listViewItem == 0)
break;
}
return name;
@@ -566,7 +566,7 @@ bool isCommonXMIAttribute(const QString &tag)
bool isCommonDataType(QString type)
{
CodeGenerator *gen = UMLApp::app()->generator();
- if (gen == NULL)
+ if (gen == 0)
return false;
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
const QStringList dataTypes = gen->defaultDatatypes();
@@ -651,7 +651,7 @@ Uml::ModelType::Enum guessContainer(UMLObject *o)
UMLDoc *umldoc = UMLApp::app()->document();
for (int r = Uml::RoleType::A; r <= Uml::RoleType::B; ++r) {
UMLObject *roleObj = assoc->getObject(Uml::RoleType::fromInt(r));
- if (roleObj == NULL) {
+ if (roleObj == 0) {
// Ouch! we have been called while types are not yet resolved
return Uml::ModelType::N_MODELTYPES;
}
@@ -724,15 +724,15 @@ Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningSc
QStringList nameAndType = t.split(QRegExp(QLatin1String("\\s*:\\s*")));
if (nameAndType.count() == 2) {
- UMLObject *pType = NULL;
+ UMLObject *pType = 0;
if (nameAndType[1] != QLatin1String("class")) {
pType = pDoc->findUMLObject(nameAndType[1], UMLObject::ot_UMLObject, owningScope);
- if (pType == NULL)
+ if (pType == 0)
return PS_Unknown_ArgType;
}
nmTp = NameAndType(nameAndType[0], pType);
} else {
- nmTp = NameAndType(t, NULL);
+ nmTp = NameAndType(t, 0);
}
return PS_OK;
}
@@ -765,7 +765,7 @@ Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningS
int colonPos = a.indexOf(QLatin1Char(':'));
if (colonPos < 0) {
- nmTp = NameAndType(a, NULL);
+ nmTp = NameAndType(a, 0);
return PS_OK;
}
QString name = a.left(colonPos).trimmed();
@@ -801,14 +801,14 @@ Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningS
}
a = a.mid(colonPos + 1).trimmed();
if (a.isEmpty()) {
- nmTp = NameAndType(name, NULL, pd);
+ nmTp = NameAndType(name, 0, pd);
return PS_OK;
}
QStringList typeAndInitialValue = a.split(QRegExp(QLatin1String("\\s*=\\s*")));
const QString &type = typeAndInitialValue[0];
UMLObject *pType = pDoc->findUMLObject(type, UMLObject::ot_UMLObject, owningScope);
- if (pType == NULL) {
- nmTp = NameAndType(name, NULL, pd);
+ if (pType == 0) {
+ nmTp = NameAndType(name, 0, pd);
return PS_Unknown_ArgType;
}
QString initialValue;
@@ -852,7 +852,7 @@ Parse_Status parseOperation(QString m, OpDescriptor& desc, UMLClassifier *owning
return PS_Illegal_MethodName;
desc.m_name = beginningUpToOpenParenth.cap(1);
}
- desc.m_pReturnType = NULL;
+ desc.m_pReturnType = 0;
QRegExp pat = QRegExp(QLatin1String("\\) *:(.*)$"));
int pos = pat.indexIn(m);
if (pos != -1) { // return type is optional
@@ -860,9 +860,9 @@ Parse_Status parseOperation(QString m, OpDescriptor& desc, UMLClassifier *owning
retType = retType.trimmed();
if (retType != QLatin1String("void")) {
UMLObject *pRetType = owningScope->findTemplate(retType);
- if (pRetType == NULL) {
+ if (pRetType == 0) {
pRetType = pDoc->findUMLObject(retType, UMLObject::ot_UMLObject, owningScope);
- if (pRetType == NULL)
+ if (pRetType == 0)
return PS_Unknown_ReturnType;
}
desc.m_pReturnType = pRetType;
@@ -1378,7 +1378,7 @@ UMLListViewItem::ListViewType convert_OT_LVT(UMLObject *o)
}
return type;
}
- } while ((f = f->umlPackage()->asUMLFolder()) != NULL);
+ } while ((f = f->umlPackage()->asUMLFolder()) != 0);
uError() << "convert_OT_LVT(" << o->name()
<< "): internal error - object is not properly nested in folder";
}
diff --git a/umbrello/object_factory.cpp b/umbrello/object_factory.cpp
index 173063d..4e34f50 100644
--- a/umbrello/object_factory.cpp
+++ b/umbrello/object_factory.cpp
@@ -99,11 +99,11 @@ bool assignUniqueIdOnCreation()
UMLObject* createNewUMLObject(UMLObject::ObjectType type, const QString &name,
UMLPackage *parentPkg, bool undoable /* = true */)
{
- if (parentPkg == NULL) {
+ if (parentPkg == 0) {
uError() << name << ": parentPkg is NULL";
- return NULL;
+ return 0;
}
- QPointer<UMLObject> o = NULL;
+ QPointer<UMLObject> o = 0;
switch (type) {
case UMLObject::ot_Actor:
o = new UMLActor(name, g_predefinedId);
@@ -154,7 +154,7 @@ UMLObject* createNewUMLObject(UMLObject::ObjectType type, const QString &name,
break;
default:
uWarning() << "error unknown type: " << UMLObject::toString(type);
- return NULL;
+ return 0;
}
if (!undoable) {
@@ -201,7 +201,7 @@ UMLObject* createUMLObject(UMLObject::ObjectType type, const QString &n,
bool solicitNewName /* = true */)
{
UMLDoc *doc = UMLApp::app()->document();
- if (parentPkg == NULL) {
+ if (parentPkg == 0) {
if (type == UMLObject::ot_Datatype) {
parentPkg = doc->datatypeFolder();
} else {
@@ -214,7 +214,7 @@ UMLObject* createUMLObject(UMLObject::ObjectType type, const QString &n,
}
if (!n.isEmpty()) {
UMLObject *o = doc->findUMLObject(n, type, parentPkg);
- if (o == NULL) {
+ if (o == 0) {
o = createNewUMLObject(type, n, parentPkg);
return o;
}
@@ -257,7 +257,7 @@ UMLObject* createUMLObject(UMLObject::ObjectType type, const QString &n,
continue;
}
CodeGenerator *codegen = UMLApp::app()->generator();
- if (codegen != NULL && codegen->isReservedKeyword(name)) {
+ if (codegen != 0 && codegen->isReservedKeyword(name)) {
KMessageBox::error(0, i18n("This is a reserved keyword for the language of the configured code generator."),
i18n("Reserved Keyword"));
continue;
@@ -301,7 +301,7 @@ UMLOperation *createOperation(UMLClassifier *parent, const QString& name)
*/
UMLClassifierListItem* createChildObject(UMLClassifier* parent, UMLObject::ObjectType type, const QString& name)
{
- UMLObject* returnObject = NULL;
+ UMLObject* returnObject = 0;
switch (type) {
case UMLObject::ot_Attribute: {
UMLClassifier *c = parent->asUMLClassifier();
@@ -383,7 +383,7 @@ UMLObject* makeObjectFromXMI(const QString& xmiTag,
if (stereo && stereo->name() == QLatin1String("folder"))
pObject = new UMLFolder();
}
- if (pObject == NULL)
+ if (pObject == 0)
pObject = new UMLPackage();
} else if (UMLDoc::tagEq(xmiTag, QLatin1String("Component"))) {
pObject = new UMLComponent();
diff --git a/umbrello/petaltree2uml.cpp b/umbrello/petaltree2uml.cpp
index b525b1d..e1bc11a 100644
--- a/umbrello/petaltree2uml.cpp
+++ b/umbrello/petaltree2uml.cpp
@@ -226,7 +226,7 @@ public:
void read(const PetalNode *node, const QString& name)
{
PetalNode *attributes = node->findAttribute(m_attributeTag).node;
- if (attributes == NULL) {
+ if (attributes == 0) {
#ifdef VERBOSE_DEBUGGING
uDebug() << name << ": no " << m_attributeTag << " found";
#endif
@@ -401,12 +401,12 @@ UMLPackage* handleControlledUnit(PetalNode *node, const QString& name,
{
Q_UNUSED(id);
if (node->findAttribute(QLatin1String("is_unit")).string != QLatin1String("TRUE"))
- return NULL;
+ return 0;
//bool is_loaded = (node->findAttribute(QLatin1String("is_loaded")).string != QLatin1String("FALSE"));
QString file_name = node->findAttribute(QLatin1String("file_name")).string;
if (file_name.isEmpty()) {
uError() << name << ": attribute file_name not found (?)";
- return NULL;
+ return 0;
}
file_name = file_name.mid(1, file_name.length() - 2); // remove sourrounding ""
/* I wanted to use
@@ -429,7 +429,7 @@ UMLPackage* handleControlledUnit(PetalNode *node, const QString& name,
if (envVarBA.isNull() || envVarBA.isEmpty()) {
uError() << name << "cannot process file_name " << file_name
<< " because environment variable " << envVarName << " not set";
- return NULL;
+ return 0;
}
QString envVar(QString::fromLatin1(envVarBA));
uDebug() << name << ": envVar " << envVarName << " contains " << envVar;
@@ -450,11 +450,11 @@ UMLPackage* handleControlledUnit(PetalNode *node, const QString& name,
QFile file(file_name);
if (!file.exists()) {
uError() << name << ": file_name " << file_name << " not found";
- return NULL;
+ return 0;
}
if (!file.open(QIODevice::ReadOnly)) {
uError() << name << ": file_name " << file_name << " cannot be opened";
- return NULL;
+ return 0;
}
UMLPackage *controlledUnit = loadFromMDL(file, parentPkg);
return controlledUnit;
@@ -468,7 +468,7 @@ void handleAssocView(PetalNode *attr,
{
QString assocStr = Uml::AssociationType::toString(assocType);
PetalNode *roleview_list = attr->findAttribute(QLatin1String("roleview_list")).node;
- if (roleview_list == NULL) {
+ if (roleview_list == 0) {
uError() << assocStr << " roleview_list not found";
return;
}
@@ -500,7 +500,7 @@ void handleAssocView(PetalNode *attr,
}
return;
}
- PetalNode *sup = NULL, *cli = NULL;
+ PetalNode *sup = 0, *cli = 0;
for (int c = 0; c < parentAttrs.count(); ++c) {
PetalNode *n = parentAttrs[c].second.node;
QStringList initArgs = n->initialArgs();
@@ -518,10 +518,10 @@ void handleAssocView(PetalNode *attr,
if (spId != Uml::ID::None && clId != Uml::ID::None) {
UMLWidget *supW = view->umlScene()->widgetOnDiagram(spId);
UMLWidget *cliW = view->umlScene()->widgetOnDiagram(clId);
- if (supW == NULL) {
+ if (supW == 0) {
uError() << assocStr << " supplier widget " << spIdStr
<< " is not on diagram (?)";
- } else if (cliW == NULL) {
+ } else if (cliW == 0) {
uError() << assocStr << " client widget " << clIdStr
<< " is not on diagram (?)";
} else {
@@ -561,7 +561,7 @@ Uml::DiagramType::Enum diagramType(QString objType)
*/
bool umbrellify(PetalNode *node, UMLPackage *parentPkg)
{
- if (node == NULL) {
+ if (node == 0) {
uError() << "node is NULL";
return false;
}
@@ -576,7 +576,7 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg)
QString modelsAttr(isSubsystem ? QLatin1String("physical_models")
: QLatin1String("logical_models"));
PetalNode *models = node->findAttribute(modelsAttr).node;
- UMLObject *o = NULL;
+ UMLObject *o = 0;
if (models) {
PetalNode::NameValueList atts = models->attributes();
QString presAttr(isSubsystem ? QLatin1String("physical_presentations")
@@ -600,7 +600,7 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg)
}
} else {
o = handleControlledUnit(node, name, id, parentPkg);
- if (o == NULL) {
+ if (o == 0) {
uWarning() << objType << " handleControlledUnit(" << name << ") returns error";
return false;
}
@@ -611,7 +611,7 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg)
} else if (objType == QLatin1String("Class")) {
QString stereotype = clean(node->findAttribute(QLatin1String("stereotype")).string);
- UMLObject *o = NULL;
+ UMLObject *o = 0;
if (stereotype == QLatin1String("Actor")) {
o = Object_Factory::createUMLObject(UMLObject::ot_Actor, name, parentPkg, false);
o->setID(id);
@@ -659,7 +659,7 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg)
} else if (objType == QLatin1String("Association")) {
PetalNode *roles = node->findAttribute(QLatin1String("roles")).node;
- if (roles == NULL) {
+ if (roles == 0) {
uError() << "cannot find roles of Association";
return false;
}
@@ -667,7 +667,7 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg)
PetalNode::NameValueList roleList = roles->attributes();
for (uint i = 0; i <= 1; ++i) {
PetalNode *roleNode = roleList[i].second.node;
- if (roleNode == NULL) {
+ if (roleNode == 0) {
uError() << "roleNode of Association is NULL";
return false;
}
@@ -728,7 +728,7 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg)
UMLFolder *rootFolder = parentPkg->asUMLFolder();
UMLView *view = umlDoc->createDiagram(rootFolder, dt, name, id);
PetalNode *items = node->findAttribute(QLatin1String("items")).node;
- if (items == NULL) {
+ if (items == 0) {
uError() << "umbrellify: " << objType << " attribute 'items' not found";
return false;
}
@@ -883,7 +883,7 @@ bool importView(PetalNode *root,
const QString& presentationsName)
{
PetalNode *viewRoot = root->findAttribute(rootName).node;
- if (viewRoot == NULL) {
+ if (viewRoot == 0) {
uDebug() << "cannot find " << rootName;
return false;
}
@@ -893,7 +893,7 @@ bool importView(PetalNode *root,
return false;
}
PetalNode *models = viewRoot->findAttribute(modelsName).node;
- if (models == NULL) {
+ if (models == 0) {
uError() << "cannot find " << modelsName << " of " << rootName;
return false;
}
@@ -911,7 +911,7 @@ bool importView(PetalNode *root,
return true;
PetalNode *presentations = viewRoot->findAttribute(presentationsName).node;
- if (presentations == NULL) {
+ if (presentations == 0) {
uError() << modelsName << ": cannot find " << presentationsName;
return false;
}
@@ -933,23 +933,23 @@ bool importView(PetalNode *root,
*/
UMLPackage * petalTree2Uml(PetalNode *root, UMLPackage *parentPkg)
{
- if (root == NULL) {
+ if (root == 0) {
uError() << "petalTree2Uml: root is NULL";
- return NULL;
+ return 0;
}
UMLPackage *rootPkg = Model_Utils::rootPackage(parentPkg);
- if (rootPkg == NULL) {
+ if (rootPkg == 0) {
uError() << "petalTree2Uml: internal error - rootPkg is NULL";
- return NULL;
+ return 0;
}
UMLDoc *umlDoc = UMLApp::app()->document();
Uml::ModelType::Enum mt = umlDoc->rootFolderType(rootPkg);
QString modelsAttr(mt == Uml::ModelType::Component ? QLatin1String("physical_models")
: QLatin1String("logical_models"));
PetalNode *models = root->findAttribute(modelsAttr).node;
- if (models == NULL) {
+ if (models == 0) {
uError() << "petalTree2Uml: cannot find " << modelsAttr;
- return NULL;
+ return 0;
}
QStringList args = root->initialArgs();
QString name = clean(args[1]);
diff --git a/umbrello/uml.cpp b/umbrello/uml.cpp
index 3ec3831..b33a7d1 100644
--- a/umbrello/uml.cpp
+++ b/umbrello/uml.cpp
@@ -144,7 +144,7 @@ QMenu* UMLApp::findMenu(const QString& name)
return dynamic_cast<QMenu*>(widget);
}
DEBUG(DBG_SRC) << "factory()->container(" << name << ") returns NULL";
- return NULL;
+ return 0;
}
DEBUG_REGISTER(UMLApp)
@@ -209,14 +209,14 @@ UMLApp::UMLApp(QWidget* parent)
m_langSelect = findMenu(QLatin1String("active_lang_menu"));
//in case langSelect hasn't been initialized we create the Popup menu.
//it will be hidden, but at least we wont crash if someone takes the entry away from the ui.rc file
- if (m_langSelect == NULL) {
+ if (m_langSelect == 0) {
m_langSelect = new QMenu(QLatin1String("active_lang_menu"), this);
}
m_zoomSelect = findMenu(QLatin1String("zoom_menu"));
//in case zoomSelect hasn't been initialized we create the Popup menu.
//it will be hidden, but at least we wont crash if some one takes the entry away from the ui.rc file
- if (m_zoomSelect == NULL) {
+ if (m_zoomSelect == 0) {
m_zoomSelect = new QMenu(QLatin1String("zoom_menu"), this);
}
@@ -2388,7 +2388,7 @@ void UMLApp::viewCodeDocument(UMLClassifier* classifier)
dialog->exec();
optionState.codeViewerState = dialog->state();
delete dialog;
- dialog = NULL;
+ dialog = 0;
} else {
// shouldn't happen..
KMessageBox::sorry(0, i18n("Cannot view code until you generate some first."), i18n("Cannot View Code"));
@@ -2452,9 +2452,9 @@ CodeGenerator *UMLApp::setGenerator(Uml::ProgrammingLanguage::Enum pl)
if (pl == Uml::ProgrammingLanguage::Reserved) {
if (m_codegen) {
delete m_codegen;
- m_codegen = NULL;
+ m_codegen = 0;
}
- return NULL;
+ return 0;
}
if (m_codegen) {
// Do not return a possible preexisting code generator:
@@ -2462,7 +2462,7 @@ CodeGenerator *UMLApp::setGenerator(Uml::ProgrammingLanguage::Enum pl)
// Some languages depend on a new generator instance being created
// for each run.
delete m_codegen; // ATTENTION! remove all refs to it or its policy first
- m_codegen = NULL;
+ m_codegen = 0;
}
m_activeLanguage = pl;
m_codegen = CodeGenFactory::createObject(pl);
@@ -3058,7 +3058,7 @@ void UMLApp::initGenerator()
{
if (m_codegen) {
delete m_codegen;
- m_codegen = NULL;
+ m_codegen = 0;
}
Uml::ProgrammingLanguage::Enum defLanguage = defaultLanguage();
setActiveLanguage(defLanguage);
@@ -3115,7 +3115,7 @@ void UMLApp::handleCursorKeyReleaseEvent(QKeyEvent* e)
{
// in case we have selected something in the diagram, move it by one pixel
// to the direction pointed by the cursor key
- if (m_view == NULL || !m_view->umlScene()->selectedCount() || e->modifiers() != Qt::AltModifier) {
+ if (m_view == 0 || !m_view->umlScene()->selectedCount() || e->modifiers() != Qt::AltModifier) {
e->ignore();
return;
}
@@ -3237,7 +3237,7 @@ void UMLApp::slotBirdViewChanged(const QPointF& delta)
void UMLApp::setCurrentView(UMLView* view, bool updateTreeView)
{
m_view = view;
- if (view == NULL) {
+ if (view == 0) {
DEBUG(DBG_SRC) << "view is NULL";
docWindow()->reset();
return;
@@ -3361,12 +3361,12 @@ void UMLApp::slotChangeTabLeft()
uError() << "currView not found in viewlist";
return;
}
- UMLView* prevView = NULL;
+ UMLView* prevView = 0;
if (viewIndex != 0) {
prevView = views.begin()[viewIndex -1 ];
}
- if ((currView = prevView) != NULL) {
+ if ((currView = prevView) != 0) {
setCurrentView(currView);
}
else {
@@ -3391,7 +3391,7 @@ void UMLApp::slotChangeTabRight()
uError() << "currView not found in viewlist";
return;
}
- UMLView* nextView = NULL;
+ UMLView* nextView = 0;
if (viewIndex < views.count()-1) {
nextView = views.begin()[viewIndex + 1];
setCurrentView(nextView);
@@ -3558,7 +3558,7 @@ void UMLApp::executeCommand(QUndoCommand* cmd)
if (!m_pUndoStack)
return;
- if (cmd == NULL)
+ if (cmd == 0)
return;
if (isUndoEnabled()) {
m_pUndoStack->push(cmd);
diff --git a/umbrello/umldoc.cpp b/umbrello/umldoc.cpp
index beee8dd..929c885 100644
--- a/umbrello/umldoc.cpp
+++ b/umbrello/umldoc.cpp
@@ -230,7 +230,7 @@ void UMLDoc::addView(UMLView *view)
connect(this, SIGNAL(sigObjectRemoved(UMLObject*)), view->umlScene(), SLOT(slotObjectRemoved(UMLObject*)));
}
- if (!m_bLoading || pApp->currentView() == NULL) {
+ if (!m_bLoading || pApp->currentView() == 0) {
pApp->setCurrentView(view);
}
if (!m_bLoading) {
@@ -1842,7 +1842,7 @@ void UMLDoc::setCurrentRoot(Uml::ModelType::Enum rootType)
*/
void UMLDoc::removeUMLObject(UMLObject* umlobject, bool deleteObject)
{
- if (umlobject == NULL) {
+ if (umlobject == 0) {
uError() << "called with NULL parameter";
return;
}
@@ -1903,7 +1903,7 @@ void UMLDoc::removeUMLObject(UMLObject* umlobject, bool deleteObject)
// In the current implementation, all associations live in the
// root folder.
UMLPackage* rootPkg = Model_Utils::rootPackage(c);
- if (rootPkg == NULL) {
+ if (rootPkg == 0) {
uError() << umlobject->name() << ": root package is not set !";
return;
}
diff --git a/umbrello/umlmodel/association.cpp b/umbrello/umlmodel/association.cpp
index 54d123b..f8e1c8b 100644
--- a/umbrello/umlmodel/association.cpp
+++ b/umbrello/umlmodel/association.cpp
@@ -61,7 +61,7 @@ UMLAssociation::UMLAssociation(Uml::AssociationType::Enum type,
UMLAssociation::UMLAssociation(Uml::AssociationType::Enum type)
: UMLObject(QString(), Uml::ID::Reserved)
{
- init(type, NULL, NULL);
+ init(type, 0, 0);
}
/**
@@ -69,17 +69,17 @@ UMLAssociation::UMLAssociation(Uml::AssociationType::Enum type)
*/
UMLAssociation::~UMLAssociation()
{
- if (m_pRole[RoleType::A] == NULL) {
+ if (m_pRole[RoleType::A] == 0) {
uError() << "UMLAssociation destructor: m_pRole[A] is NULL already";
} else {
delete m_pRole[RoleType::A];
- m_pRole[RoleType::A] = NULL;
+ m_pRole[RoleType::A] = 0;
}
- if (m_pRole[RoleType::B] == NULL) {
+ if (m_pRole[RoleType::B] == 0) {
uError() << "UMLAssociation destructor: m_pRole[B] is NULL already";
} else {
delete m_pRole[RoleType::B];
- m_pRole[RoleType::B] = NULL;
+ m_pRole[RoleType::B] = 0;
}
}
@@ -230,7 +230,7 @@ bool UMLAssociation::load(QDomElement & element)
return false; // old style XMI file. No real info in this association.
UMLDoc * doc = UMLApp::app()->document();
- UMLObject * obj[2] = { NULL, NULL };
+ UMLObject * obj[2] = { 0, NULL };
if (m_AssocType == Uml::AssociationType::Generalization ||
m_AssocType == Uml::AssociationType::Realization ||
m_AssocType == Uml::AssociationType::Dependency ||
@@ -239,7 +239,7 @@ bool UMLAssociation::load(QDomElement & element)
QString general = element.attribute(QLatin1String("general"));
if (!general.isEmpty()) {
UMLClassifier *owningClassifier = umlParent()->asUMLClassifier();
- if (owningClassifier == NULL){
+ if (owningClassifier == 0){
uWarning() << "Cannot load UML2 generalization: m_pUMLPackage is expected "
<< "to be the owning classifier (=client)";
return false;
@@ -264,11 +264,11 @@ bool UMLAssociation::load(QDomElement & element)
// set umlobject of role if possible (else defer resolution)
obj[r] = doc->findObjectById(Uml::ID::fromString(roleIdStr));
Uml::RoleType::Enum role = Uml::RoleType::fromInt(r);
- if (obj[r] == NULL) {
+ if (obj[r] == 0) {
m_pRole[role]->setSecondaryId(roleIdStr); // defer to resolveRef()
} else {
m_pRole[role]->setObject(obj[r]);
- if (umlPackage() == NULL) {
+ if (umlPackage() == 0) {
Uml::ModelType::Enum mt = Model_Utils::convert_OT_MT(obj[r]->baseType());
setUMLPackage(doc->rootFolder(mt));
DEBUG(DBG_SRC) << "assoctype " << m_AssocType
@@ -276,7 +276,7 @@ bool UMLAssociation::load(QDomElement & element)
}
}
}
- if (obj[RoleType::A] == NULL || obj[RoleType::B] == NULL) {
+ if (obj[RoleType::A] == 0 || obj[RoleType::B] == 0) {
for (QDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
@@ -378,7 +378,7 @@ bool UMLAssociation::load(QDomElement & element)
if (! getUMLRole(RoleType::B)->loadFromXMI(tempElement))
return false;
- if (umlPackage() == NULL) {
+ if (umlPackage() == 0) {
Uml::ModelType::Enum mt = Model_Utils::convert_OT_MT(getObject(RoleType::B)->baseType());
setUMLPackage(doc->rootFolder(mt));
DEBUG(DBG_SRC) << "setting model type " << Uml::ModelType::toString(mt);
@@ -514,8 +514,8 @@ bool UMLAssociation::load(QDomElement & element)
*/
UMLObject* UMLAssociation::getObject(Uml::RoleType::Enum role) const
{
- if (m_pRole[role] == NULL)
- return NULL;
+ if (m_pRole[role] == 0)
+ return 0;
return m_pRole[role]->object();
}
@@ -527,10 +527,10 @@ UMLObject* UMLAssociation::getObject(Uml::RoleType::Enum role) const
Uml::ID::Type UMLAssociation::getObjectId(Uml::RoleType::Enum role) const
{
UMLRole *roleObj = m_pRole[role];
- if (roleObj == NULL)
+ if (roleObj == 0)
return Uml::ID::None;
UMLObject *o = roleObj->object();
- if (o == NULL) {
+ if (o == 0) {
QString auxID = roleObj->secondaryId();
if (auxID.isEmpty()) {
uError() << "role " << role << ": getObject returns NULL";
diff --git a/umbrello/umlmodel/association.h b/umbrello/umlmodel/association.h
index 385c5b8..69ab304 100644
--- a/umbrello/umlmodel/association.h
+++ b/umbrello/umlmodel/association.h
@@ -72,7 +72,7 @@ public:
void setOldLoadMode(bool value = true);
bool getOldLoadMode() const;
- virtual UMLObject* clone() const { return NULL; }
+ virtual UMLObject* clone() const { return 0; }
virtual bool resolveRef();
diff --git a/umbrello/umlmodel/attribute.cpp b/umbrello/umlmodel/attribute.cpp
index 5a94072..01a4f93 100644
--- a/umbrello/umlmodel/attribute.cpp
+++ b/umbrello/umlmodel/attribute.cpp
@@ -43,7 +43,7 @@ UMLAttribute::UMLAttribute(UMLObject *parent,
m_visibility = s;
m_ParmKind = Uml::ParameterDirection::In;
/* CHECK: Do we need this:
- if (type == NULL) {
+ if (type == 0) {
type = Object_Factory::createUMLObject(Uml::ot_Datatype, "undef");
}
*/
@@ -147,7 +147,7 @@ QString UMLAttribute::toString(Uml::SignatureType::Enum sig)
owningObject = owningObject->umlParent();
}
UMLClassifier *ownParent = owningObject->asUMLClassifier();
- if (ownParent == NULL) {
+ if (ownParent == 0) {
uError() << "parent " << owningObject->name()
<< " is not a UMLClassifier";
return QString();
@@ -183,14 +183,14 @@ QString UMLAttribute::toString(Uml::SignatureType::Enum sig)
QString UMLAttribute::getFullyQualifiedName(const QString& separator,
bool includeRoot /* = false */) const
{
- UMLOperation *op = NULL;
+ UMLOperation *op = 0;
UMLObject *owningObject = umlParent();
if (owningObject->baseType() == UMLObject::ot_Operation) {
op = owningObject->asUMLOperation();
owningObject = owningObject->umlParent();
}
UMLClassifier *ownParent = owningObject->asUMLClassifier();
- if (ownParent == NULL) {
+ if (ownParent == 0) {
uError() << name() << ": parent " << owningObject->name()
<< " is not a UMLClassifier";
return QString();
@@ -259,8 +259,8 @@ UMLObject* UMLAttribute::clone() const
void UMLAttribute::saveToXMI(QDomDocument & qDoc, QDomElement & qElement)
{
QDomElement attributeElement = UMLObject::save(QLatin1String("UML:Attribute"), qDoc);
- if (m_pSecondary == NULL) {
- uDebug() << name() << ": m_pSecondary is NULL, m_SecondaryId is '"
+ if (m_pSecondary == 0) {
+ uDebug() << name() << ": m_pSecondary is 0, m_SecondaryId is '"
<< m_SecondaryId << "'";
} else {
attributeElement.setAttribute(QLatin1String("type"), Uml::ID::toString(m_pSecondary->id()));
@@ -382,10 +382,10 @@ void UMLAttribute::setTemplateParams(const QString& templateParam, UMLClassifier
if (!param.isEmpty()) {
UMLDoc *pDoc = UMLApp::app()->document();
UMLObject* obj = pDoc->findUMLObject(param);
- if (obj == NULL) {
+ if (obj == 0) {
obj = pDoc->findUMLObject(param.remove(QLatin1Char(' ')));
}
- if (obj != NULL) {
+ if (obj != 0) {
//We want to list only the params that already exist in this document
//If the param doesnt't already exist, we couldn't draw an association anyway
UMLClassifier* tmpClassifier = obj->asUMLClassifier();
diff --git a/umbrello/umlmodel/classifier.cpp b/umbrello/umlmodel/classifier.cpp
index 9464b53..4df7374 100644
--- a/umbrello/umlmodel/classifier.cpp
+++ b/umbrello/umlmodel/classifier.cpp
@@ -63,7 +63,7 @@ UMLClassifier::UMLClassifier(const QString & name, Uml::ID::Type id)
: UMLPackage(name, id)
{
m_BaseType = UMLObject::ot_Class; // default value
- m_pClassAssoc = NULL;
+ m_pClassAssoc = 0;
}
/**
@@ -136,7 +136,7 @@ UMLOperation * UMLClassifier::checkOperationSignature(
{
UMLOperationList list = findOperations(name);
if (list.count() == 0) {
- return NULL;
+ return 0;
}
const int inputParmCount = opParams.count();
@@ -163,7 +163,7 @@ UMLOperation * UMLClassifier::checkOperationSignature(
}
}
// we did not find an exact match, so the signature is unique (acceptable)
- return NULL;
+ return 0;
}
/**
@@ -179,7 +179,7 @@ UMLOperation* UMLClassifier::findOperation(const QString& name,
{
UMLOperationList list = findOperations(name);
if (list.count() == 0) {
- return NULL;
+ return 0;
}
// if there are operation(s) with the same name then compare the parameter list
const int inputParmCount = params.count();
@@ -196,9 +196,9 @@ UMLOperation* UMLClassifier::findOperation(const QString& name,
Model_Utils::NameAndType_ListIt nt(params.begin() + i);
UMLClassifier *type = (*nt).m_type->asUMLClassifier();
UMLClassifier *testType = testParams.at(i)->getType();
- if (type == NULL && testType == NULL) { //no parameter type
+ if (type == 0 && testType == 0) { //no parameter type
continue;
- } else if (type == NULL) { //template parameter
+ } else if (type == 0) { //template parameter
if (testType->name() != QLatin1String("class"))
break;
} else if (type != testType)
@@ -215,7 +215,7 @@ UMLOperation* UMLClassifier::findOperation(const QString& name,
* The new operation is initialized with name, id, etc.
* If a method with the given profile already exists in the classifier,
* no new method is created and the existing operation is returned.
- * If no name is provided, or if the params are NULL, an Operation
+ * If no name is provided, or if the params are 0, an Operation
* Dialog is shown to ask the user for a name and parameters.
* The operation's signature is checked for validity within the parent
* classifier.
@@ -233,8 +233,8 @@ UMLOperation* UMLClassifier::findOperation(const QString& name,
*/
UMLOperation* UMLClassifier::createOperation(
const QString &name /*=QString()*/,
- bool *isExistingOp /*=NULL*/,
- Model_Utils::NameAndType_List *params /*=NULL*/)
+ bool *isExistingOp /*=0*/,
+ Model_Utils::NameAndType_List *params /*=0*/)
{
bool nameNotSet = (name.isNull() || name.isEmpty());
if (! nameNotSet) {
@@ -242,8 +242,8 @@ UMLOperation* UMLClassifier::createOperation(
if (params)
parList = *params;
UMLOperation* existingOp = findOperation(name, parList);
- if (existingOp != NULL) {
- if (isExistingOp != NULL)
+ if (existingOp != 0) {
+ if (isExistingOp != 0)
*isExistingOp = true;
return existingOp;
}
@@ -270,7 +270,7 @@ UMLOperation* UMLClassifier::createOperation(
if(operationDialog->exec() != QDialog::Accepted) {
delete op;
delete operationDialog;
- return NULL;
+ return 0;
} else if (checkOperationSignature(op->name(), op->getParmList())) {
KMessageBox::information(0,
i18n("An operation with the same name and signature already exists. You cannot add it again."));
@@ -284,7 +284,7 @@ UMLOperation* UMLClassifier::createOperation(
// operation name is ok, formally add it to the classifier
if (! addOperation(op)) {
delete op;
- return NULL;
+ return 0;
}
UMLDoc *umldoc = UMLApp::app()->document();
@@ -362,7 +362,7 @@ bool UMLClassifier::addOperation(UMLOperation* op, IDChangeLog* log)
*/
int UMLClassifier::removeOperation(UMLOperation *op)
{
- if (op == NULL) {
+ if (op == 0) {
uDebug() << "called on NULL op";
return -1;
}
@@ -402,7 +402,7 @@ UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString(
if (name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
}
- else if (findChildObject(name) != NULL) {
+ else if (findChildObject(name) != 0) {
KMessageBox::error(0, i18n("That name is already being used."), i18n("Not a Unique Name"));
}
else {
@@ -412,7 +412,7 @@ UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString(
}
if (button != QDialog::Accepted) {
- return NULL;
+ return 0;
}
addTemplate(newTemplate);
@@ -564,7 +564,7 @@ UMLObject* UMLClassifier::findChildObjectById(Uml::ID::Type id, bool considerAnc
}
}
}
- return NULL;
+ return 0;
}
/**
@@ -772,7 +772,7 @@ UMLAttribute* UMLClassifier::createAttribute(const QString &name,
if(name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
- } else if (findChildObject(name) != NULL) {
+ } else if (findChildObject(name) != 0) {
KMessageBox::error(0, i18n("That name is already being used."), i18n("Not a Unique Name"));
} else {
goodName = true;
@@ -782,7 +782,7 @@ UMLAttribute* UMLClassifier::createAttribute(const QString &name,
if (button != QDialog::Accepted) {
delete newAttribute;
- return NULL;
+ return 0;
}
addAttribute(newAttribute);
@@ -857,7 +857,7 @@ bool UMLClassifier::addAttribute(UMLAttribute* att, IDChangeLog* log /* = 0 */,
int position /* = -1 */)
{
Q_ASSERT(att);
- if (findChildObject(att->name()) == NULL) {
+ if (findChildObject(att->name()) == 0) {
att->setParent(this);
if (position >= 0 && position < (int)m_List.count()) {
m_List.insert(position, att);
@@ -1058,7 +1058,7 @@ UMLTemplate* UMLClassifier::addTemplate(const QString &name, Uml::ID::Type id)
bool UMLClassifier::addTemplate(UMLTemplate* newTemplate, IDChangeLog* log /* = 0*/)
{
QString name = newTemplate->name();
- if (findChildObject(name) == NULL) {
+ if (findChildObject(name) == 0) {
newTemplate->setParent(this);
m_List.append(newTemplate);
emit templateAdded(newTemplate);
@@ -1087,7 +1087,7 @@ bool UMLClassifier::addTemplate(UMLTemplate* templt, int position)
{
Q_ASSERT(templt);
QString name = templt->name();
- if (findChildObject(name) == NULL) {
+ if (findChildObject(name) == 0) {
templt->setParent(this);
if (position >= 0 && position <= (int)m_List.count()) {
m_List.insert(position, templt);
@@ -1445,14 +1445,14 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement)
*/
UMLClassifierListItem* UMLClassifier::makeChildObject(const QString& xmiTag)
{
- UMLClassifierListItem* pObject = NULL;
+ UMLClassifierListItem* pObject = 0;
if (UMLDoc::tagEq(xmiTag, QLatin1String("Operation")) ||
UMLDoc::tagEq(xmiTag, QLatin1String("ownedOperation"))) {
pObject = new UMLOperation(this);
} else if (UMLDoc::tagEq(xmiTag, QLatin1String("Attribute")) ||
UMLDoc::tagEq(xmiTag, QLatin1String("ownedAttribute"))) {
if (baseType() != UMLObject::ot_Class)
- return NULL;
+ return 0;
pObject = new UMLAttribute(this);
} else if (UMLDoc::tagEq(xmiTag, QLatin1String("TemplateParameter"))) {
pObject = new UMLTemplate(this);
@@ -1469,7 +1469,7 @@ UMLClassifierListItem* UMLClassifier::makeChildObject(const QString& xmiTag)
*/
bool UMLClassifier::load(QDomElement& element)
{
- UMLClassifierListItem *child = NULL;
+ UMLClassifierListItem *child = 0;
bool totalSuccess = true;
for (QDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
@@ -1487,7 +1487,7 @@ bool UMLClassifier::load(QDomElement& element)
// Not evaluating the return value from load()
// because we want a best effort.
- } else if ((child = makeChildObject(tag)) != NULL) {
+ } else if ((child = makeChildObject(tag)) != 0) {
if (child->loadFromXMI(element)) {
switch (child->baseType()) {
case UMLObject::ot_Template:
@@ -1513,7 +1513,7 @@ bool UMLClassifier::load(QDomElement& element)
}
} else if (!Model_Utils::isCommonXMIAttribute(tag)) {
UMLObject *pObject = Object_Factory::makeObjectFromXMI(tag, stereotype);
- if (pObject == NULL) {
+ if (pObject == 0) {
// Not setting totalSuccess to false
// because we want a best effort.
continue;
diff --git a/umbrello/umlmodel/classifier.h b/umbrello/umlmodel/classifier.h
index d6a6026..d74f56d 100644
--- a/umbrello/umlmodel/classifier.h
+++ b/umbrello/umlmodel/classifier.h
@@ -75,15 +75,15 @@ public:
UMLAttributeList getAttributeListStatic(Uml::Visibility::Enum scope) const;
UMLOperation* createOperation(const QString &name = QString(),
- bool *isExistingOp = NULL,
- Model_Utils::NameAndType_List *params = NULL);
+ bool *isExistingOp = 0,
+ Model_Utils::NameAndType_List *params = 0);
bool addOperation(UMLOperation* op, int position = -1);
bool addOperation(UMLOperation* op, IDChangeLog* log);
UMLOperation * checkOperationSignature(const QString& name,
UMLAttributeList opParams,
- UMLOperation *exemptOp = NULL);
+ UMLOperation *exemptOp = 0);
int removeOperation(UMLOperation *op);
diff --git a/umbrello/umlmodel/classifierlistitem.cpp b/umbrello/umlmodel/classifierlistitem.cpp
index 128929c..1912f8b 100644
--- a/umbrello/umlmodel/classifierlistitem.cpp
+++ b/umbrello/umlmodel/classifierlistitem.cpp
@@ -107,10 +107,10 @@ UMLClassifier * UMLClassifierListItem::getType() const
*/
QString UMLClassifierListItem::getTypeName() const
{
- if (m_pSecondary == NULL)
+ if (m_pSecondary == 0)
return m_SecondaryId;
const UMLPackage *typePkg = m_pSecondary->umlPackage();
- if (typePkg != NULL && typePkg != umlPackage())
+ if (typePkg != 0 && typePkg != umlPackage())
return m_pSecondary->fullyQualifiedName();
return m_pSecondary->name();
}
@@ -137,13 +137,13 @@ void UMLClassifierListItem::setType(UMLObject *type)
void UMLClassifierListItem::setTypeName(const QString &type)
{
if (type.isEmpty() || type == QLatin1String("void")) {
- m_pSecondary = NULL;
+ m_pSecondary = 0;
m_SecondaryId.clear();
return;
}
UMLDoc *pDoc = UMLApp::app()->document();
m_pSecondary = pDoc->findUMLObject(type);
- if (m_pSecondary == NULL) {
+ if (m_pSecondary == 0) {
// Make data type for easily identified cases
if (Model_Utils::isCommonDataType(type) || type.contains(QLatin1Char('*'))) {
m_pSecondary = Object_Factory::createUMLObject(UMLObject::ot_Datatype, type);
diff --git a/umbrello/umlmodel/datatype.cpp b/umbrello/umlmodel/datatype.cpp
index 5eb6054..4e7ea57 100644
--- a/umbrello/umlmodel/datatype.cpp
+++ b/umbrello/umlmodel/datatype.cpp
@@ -94,7 +94,7 @@ void UMLDatatype::saveToXMI(QDomDocument & qDoc, QDomElement & qElement)
{
QDomElement classifierElement = UMLObject::save(QLatin1String("UML:DataType"), qDoc);
- if (m_pSecondary != NULL)
+ if (m_pSecondary != 0)
classifierElement.setAttribute(QLatin1String("elementReference"),
Uml::ID::toString(m_pSecondary->id()));
qElement.appendChild(classifierElement);
diff --git a/umbrello/umlmodel/entity.cpp b/umbrello/umlmodel/entity.cpp
index a87e493..60e9b53 100644
--- a/umbrello/umlmodel/entity.cpp
+++ b/umbrello/umlmodel/entity.cpp
@@ -123,7 +123,7 @@ UMLAttribute* UMLEntity::createAttribute(const QString &name /*= QString()*/, UM
if (name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
- } else if (findChildObject(name) != NULL) {
+ } else if (findChildObject(name) != 0) {
KMessageBox::error(0, i18n("That name is already being used."), i18n("Not a Unique Name"));
} else {
goodName = true;
@@ -176,7 +176,7 @@ UMLUniqueConstraint* UMLEntity::createUniqueConstraint(const QString &name)
if (name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
- } else if (findChildObject(name) != NULL) {
+ } else if (findChildObject(name) != 0) {
KMessageBox::error(0, i18n("That name is already being used."), i18n("Not a Unique Name"));
} else {
goodName = true;
@@ -186,7 +186,7 @@ UMLUniqueConstraint* UMLEntity::createUniqueConstraint(const QString &name)
if (button != QDialog::Accepted) {
delete newUniqueConstraint;
- return NULL;
+ return 0;
}
addConstraint(newUniqueConstraint);
@@ -226,7 +226,7 @@ UMLForeignKeyConstraint* UMLEntity::createForeignKeyConstraint(const QString &na
if (name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
- } else if (findChildObject(name) != NULL) {
+ } else if (findChildObject(name) != 0) {
KMessageBox::error(0, i18n("That name is already being used."), i18n("Not a Unique Name"));
} else {
goodName = true;
@@ -235,7 +235,7 @@ UMLForeignKeyConstraint* UMLEntity::createForeignKeyConstraint(const QString &na
}
if (button != QDialog::Accepted) {
- return NULL;
+ return 0;
}
addConstraint(newForeignKeyConstraint);
@@ -275,7 +275,7 @@ UMLCheckConstraint* UMLEntity::createCheckConstraint(const QString &name)
if (name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
- } else if (findChildObject(name) != NULL) {
+ } else if (findChildObject(name) != 0) {
KMessageBox::error(0, i18n("That name is already being used."), i18n("Not a Unique Name"));
} else {
goodName = true;
@@ -284,7 +284,7 @@ UMLCheckConstraint* UMLEntity::createCheckConstraint(const QString &name)
}
if (button != QDialog::Accepted) {
- return NULL;
+ return 0;
}
addConstraint(newCheckConstraint);
@@ -322,7 +322,7 @@ UMLObject* UMLEntity::addEntityAttribute(const QString& name, Uml::ID::Type id)
bool UMLEntity::addEntityAttribute(UMLEntityAttribute* att, IDChangeLog* log /* = 0*/)
{
QString name = (QString)att->name();
- if (findChildObject(name) == NULL) {
+ if (findChildObject(name) == 0) {
att->setParent(this);
m_List.append(att);
emit entityAttributeAdded(att);
@@ -349,7 +349,7 @@ bool UMLEntity::addEntityAttribute(UMLEntityAttribute* att, int position)
{
Q_ASSERT(att);
QString name = (QString)att->name();
- if (findChildObject(name) == NULL) {
+ if (findChildObject(name) == 0) {
att->setParent(this);
if (position >= 0 && position <= (int)m_List.count()) {
m_List.insert(position, att);
@@ -510,7 +510,7 @@ bool UMLEntity::load(QDomElement& element)
*/
bool UMLEntity::setAsPrimaryKey(UMLUniqueConstraint* uconstr)
{
- if (uconstr == NULL) {
+ if (uconstr == 0) {
uDebug() << "NULL value passed. To unset a Primary Key use "
<< "unsetPrimaryKey()";
return false;
@@ -525,7 +525,7 @@ bool UMLEntity::setAsPrimaryKey(UMLUniqueConstraint* uconstr)
// check if this constraint already exists as a unique constraint for this entity
UMLUniqueConstraint* uuc = findChildObjectById(uconstr->id())->asUMLUniqueConstraint();
- if (uuc == NULL) {
+ if (uuc == 0) {
addConstraint(uconstr);
uuc = uconstr;
}
@@ -534,7 +534,7 @@ bool UMLEntity::setAsPrimaryKey(UMLUniqueConstraint* uconstr)
m_PrimaryKey = uuc;
- if (oldPrimaryKey != NULL)
+ if (oldPrimaryKey != 0)
oldPrimaryKey->emitModified();
uuc->emitModified();
@@ -573,7 +573,7 @@ bool UMLEntity::hasPrimaryKey() const
*/
bool UMLEntity::addConstraint(UMLEntityConstraint* constr)
{
- if (findChildObjectById(constr->id()) != NULL) {
+ if (findChildObjectById(constr->id()) != 0) {
uDebug() << "Constraint with id " << Uml::ID::toString(constr->id())
<< " already exists ";
return false;
@@ -596,7 +596,7 @@ bool UMLEntity::addConstraint(UMLEntityConstraint* constr)
*/
bool UMLEntity::removeConstraint(UMLEntityConstraint* constr)
{
- if (findChildObjectById(constr->id()) == NULL) {
+ if (findChildObjectById(constr->id()) == 0) {
uDebug() << "Constraint with id " << Uml::ID::toString(constr->id())
<< " does not exist ";
return false;
@@ -710,7 +710,7 @@ UMLEntityAttributeList UMLEntity::getEntityAttributes() const
*/
UMLClassifierListItem* UMLEntity::makeChildObject(const QString& xmiTag)
{
- UMLClassifierListItem* pObject = NULL;
+ UMLClassifierListItem* pObject = 0;
if (UMLDoc::tagEq(xmiTag, QLatin1String("EntityAttribute"))) {
pObject = new UMLEntityAttribute(this);
}
diff --git a/umbrello/umlmodel/entityattribute.cpp b/umbrello/umlmodel/entityattribute.cpp
index 4e9ed96..634abb2 100644
--- a/umbrello/umlmodel/entityattribute.cpp
+++ b/umbrello/umlmodel/entityattribute.cpp
@@ -238,8 +238,8 @@ UMLObject* UMLEntityAttribute::clone() const
void UMLEntityAttribute::saveToXMI(QDomDocument & qDoc, QDomElement & qElement)
{
QDomElement entityattributeElement = UMLObject::save(QLatin1String("UML:EntityAttribute"), qDoc);
- if (m_pSecondary == NULL) {
- uDebug() << name() << ": m_pSecondary is NULL, using local name " << m_SecondaryId;
+ if (m_pSecondary == 0) {
+ uDebug() << name() << ": m_pSecondary is 0, using local name " << m_SecondaryId;
entityattributeElement.setAttribute(QLatin1String("type"), m_SecondaryId);
} else {
entityattributeElement.setAttribute(QLatin1String("type"), Uml::ID::toString(m_pSecondary->id()));
diff --git a/umbrello/umlmodel/enum.cpp b/umbrello/umlmodel/enum.cpp
index f640f6c..7bce236 100644
--- a/umbrello/umlmodel/enum.cpp
+++ b/umbrello/umlmodel/enum.cpp
@@ -112,7 +112,7 @@ UMLObject* UMLEnum::createEnumLiteral(const QString& name)
if (!ok) {
delete newEnumLiteral;
- return NULL;
+ return 0;
}
addEnumLiteral(newEnumLiteral);
@@ -132,7 +132,7 @@ UMLObject* UMLEnum::createEnumLiteral(const QString& name)
UMLObject* UMLEnum::addEnumLiteral(const QString &name, Uml::ID::Type id, const QString& value)
{
UMLObject *el = UMLCanvasObject::findChildObject(name);
- if (el != NULL) {
+ if (el != 0) {
uDebug() << name << " is already present";
return el;
}
@@ -154,7 +154,7 @@ UMLObject* UMLEnum::addEnumLiteral(const QString &name, Uml::ID::Type id, const
bool UMLEnum::addEnumLiteral(UMLEnumLiteral* literal, IDChangeLog* Log /* = 0*/)
{
QString name = (QString)literal->name();
- if (findChildObject(name) == NULL) {
+ if (findChildObject(name) == 0) {
literal->setParent(this);
m_List.append(literal);
UMLObject::emitModified();
@@ -181,7 +181,7 @@ bool UMLEnum::addEnumLiteral(UMLEnumLiteral* literal, int position)
{
Q_ASSERT(literal);
QString name = (QString)literal->name();
- if (findChildObject(name) == NULL) {
+ if (findChildObject(name) == 0) {
literal->setParent(this);
if (position >= 0 && position <= (int)m_List.count()) {
m_List.insert(position, literal);
@@ -292,7 +292,7 @@ bool UMLEnum::load(QDomElement& element)
*/
UMLClassifierListItem* UMLEnum::makeChildObject(const QString& xmiTag)
{
- UMLClassifierListItem* pObject = NULL;
+ UMLClassifierListItem* pObject = 0;
if (UMLDoc::tagEq(xmiTag, QLatin1String("EnumerationLiteral")) ||
UMLDoc::tagEq(xmiTag, QLatin1String("EnumLiteral"))) {
pObject = new UMLEnumLiteral(this);
diff --git a/umbrello/umlmodel/foreignkeyconstraint.cpp b/umbrello/umlmodel/foreignkeyconstraint.cpp
index 683dadf..c9a103f 100644
--- a/umbrello/umlmodel/foreignkeyconstraint.cpp
+++ b/umbrello/umlmodel/foreignkeyconstraint.cpp
@@ -185,25 +185,25 @@ bool UMLForeignKeyConstraint::addEntityAttributePair(UMLEntityAttribute* pAttr,
{
UMLEntity *owningParent = umlParent()->asUMLEntity();
- if (pAttr == NULL || rAttr == NULL) {
+ if (pAttr == 0 || rAttr == 0) {
uError() << "null values passed to function";
return false;
}
// check for sanity of pAttr (parent entity attribute)
- if (owningParent == NULL) {
+ if (owningParent == 0) {
uError() << name() << ": parent is not a UMLEntity";
return false;
}
- if (owningParent->findChildObjectById(pAttr->id()) == NULL) {
+ if (owningParent->findChildObjectById(pAttr->id()) == 0) {
uError() << " parent " << owningParent->name()
<< " does not contain attribute " << pAttr->name();
return false;
}
//check for sanity of rAttr (referenced entity attribute)
- if (m_ReferencedEntity != NULL) {
- if (m_ReferencedEntity->findChildObjectById(rAttr->id()) == NULL) {
+ if (m_ReferencedEntity != 0) {
+ if (m_ReferencedEntity->findChildObjectById(rAttr->id()) == 0) {
uError() << " parent " << m_ReferencedEntity->name()
<< " does not contain attribute " << rAttr->name();
return false;
@@ -276,7 +276,7 @@ bool UMLForeignKeyConstraint::load(QDomElement & element)
UMLObject* obj = doc->findObjectById(referencedEntityId);
m_ReferencedEntity = obj->asUMLEntity();
- if (m_ReferencedEntity == NULL) {
+ if (m_ReferencedEntity == 0) {
// save for resolving later
m_pReferencedEntityID = referencedEntityId;
}
@@ -303,15 +303,15 @@ bool UMLForeignKeyConstraint::load(QDomElement & element)
UMLObject* keyObj = parentEntity->findChildObjectById(keyId);
UMLEntityAttribute* key = keyObj->asUMLEntityAttribute();
- if (keyObj == NULL) {
+ if (keyObj == 0) {
uWarning() << "unable to resolve foreign key referencing attribute " << xmiKey;
- } else if (m_ReferencedEntity == NULL) {
+ } else if (m_ReferencedEntity == 0) {
// if referenced entity is null, then we won't find its attributes even
// save for resolving later
m_pEntityAttributeIDMap.insert(key, valueId);
} else {
UMLObject* valueObj = m_ReferencedEntity->findChildObjectById(valueId);
- if (valueObj == NULL) {
+ if (valueObj == 0) {
uWarning() << "unable to resolve foreign key referenced attribute" << xmiValue;
} else {
m_AttributeMap[key] = valueObj->asUMLEntityAttribute();
@@ -383,7 +383,7 @@ bool UMLForeignKeyConstraint::resolveRef()
if (!Uml::ID::toString(m_pReferencedEntityID).isEmpty()) {
UMLObject* obj = doc->findObjectById(m_pReferencedEntityID);
m_ReferencedEntity = obj->asUMLEntity();
- if (m_ReferencedEntity == NULL) {
+ if (m_ReferencedEntity == 0) {
success = false;
}
}
@@ -393,7 +393,7 @@ bool UMLForeignKeyConstraint::resolveRef()
if (!Uml::ID::toString(i.value()).isEmpty()) {
UMLObject* obj = doc->findObjectById(i.value());
m_AttributeMap[i.key()] = obj->asUMLEntityAttribute();
- if (m_AttributeMap[i.key()] == NULL) {
+ if (m_AttributeMap[i.key()] == 0) {
success = false;
}
}
diff --git a/umbrello/umlmodel/operation.cpp b/umbrello/umlmodel/operation.cpp
index abcd57c..dc0836f 100644
--- a/umbrello/umlmodel/operation.cpp
+++ b/umbrello/umlmodel/operation.cpp
@@ -99,7 +99,7 @@ void UMLOperation::setType(UMLObject* type)
*/
void UMLOperation::moveParmLeft(UMLAttribute * a)
{
- if (a == NULL) {
+ if (a == 0) {
uDebug() << "called on NULL attribute";
return;
}
@@ -123,7 +123,7 @@ void UMLOperation::moveParmLeft(UMLAttribute * a)
*/
void UMLOperation::moveParmRight(UMLAttribute * a)
{
- if (a == NULL) {
+ if (a == 0) {
uDebug() << "called on NULL attribute";
return;
}
@@ -151,7 +151,7 @@ void UMLOperation::moveParmRight(UMLAttribute * a)
*/
void UMLOperation::removeParm(UMLAttribute * a, bool emitModifiedSignal /* =true */)
{
- if (a == NULL) {
+ if (a == 0) {
uDebug() << "called on NULL attribute";
return;
}
@@ -570,7 +570,7 @@ bool UMLOperation::load(QDomElement & element)
}
}
// Use deferred xmi.id resolution.
- m_pSecondary = NULL;
+ m_pSecondary = 0;
} else {
UMLAttribute * pAtt = new UMLAttribute(this);
if(!pAtt->loadFromXMI(attElement)) {
diff --git a/umbrello/umlmodel/package.cpp b/umbrello/umlmodel/package.cpp
index b3ca58f..10f9d7d 100644
--- a/umbrello/umlmodel/package.cpp
+++ b/umbrello/umlmodel/package.cpp
@@ -91,11 +91,11 @@ void UMLPackage::addAssocToConcepts(UMLAssociation* assoc)
return;
Uml::ID::Type AId = assoc->getObjectId(Uml::RoleType::A);
Uml::ID::Type BId = assoc->getObjectId(Uml::RoleType::B);
- UMLObject *o = NULL;
+ UMLObject *o = 0;
for (UMLObjectListIt oit(m_objects); oit.hasNext();) {
o = oit.next();
UMLCanvasObject *c = o->asUMLCanvasObject();
- if (c == NULL)
+ if (c == 0)
continue;
if (AId == c->id() || (BId == c->id())) {
if (c->hasAssociation(assoc))
@@ -137,7 +137,7 @@ void UMLPackage::removeAssocFromConcepts(UMLAssociation *assoc)
*/
bool UMLPackage::addObject(UMLObject *pObject)
{
- if (pObject == NULL) {
+ if (pObject == 0) {
uError() << "is called with a NULL object";
return false;
}
@@ -167,7 +167,7 @@ bool UMLPackage::addObject(UMLObject *pObject)
else {
QString name = pObject->name();
QString oldName = name;
- while (findObject(name) != NULL) {
+ while (findObject(name) != 0) {
QString prevName = name;
name = Model_Utils::uniqObjectName(pObject->baseType(), this);
bool ok = Dialog_Utils::askName(i18nc("object name", "Name"),
@@ -218,9 +218,9 @@ void UMLPackage::removeObject(UMLObject *pObject)
void UMLPackage::removeAllObjects()
{
UMLCanvasObject::removeAllChildObjects();
- UMLObject *o = NULL;
+ UMLObject *o = 0;
- while (!m_objects.isEmpty() && (o = m_objects.first()) != NULL) {
+ while (!m_objects.isEmpty() && (o = m_objects.first()) != 0) {
UMLPackage *pkg = o->asUMLPackage();
if (pkg)
pkg->removeAllObjects();
@@ -257,7 +257,7 @@ UMLObject * UMLPackage::findObject(const QString &name)
return obj;
}
}
- return NULL;
+ return 0;
}
/**
@@ -401,7 +401,7 @@ void UMLPackage::saveToXMI(QDomDocument& qDoc, QDomElement& qElement)
{
QDomElement packageElement = UMLObject::save(QLatin1String("UML:Package"), qDoc);
QDomElement ownedElement = qDoc.createElement(QLatin1String("UML:Namespace.ownedElement"));
- UMLObject *obj = NULL;
+ UMLObject *obj = 0;
// save classifiers etc.
for (UMLObjectListIt oit(m_objects); oit.hasNext();) {
obj = oit.next();
diff --git a/umbrello/umlmodel/template.cpp b/umbrello/umlmodel/template.cpp
index fc40d62..d807dca 100644
--- a/umbrello/umlmodel/template.cpp
+++ b/umbrello/umlmodel/template.cpp
@@ -54,7 +54,7 @@ UMLTemplate::~UMLTemplate()
QString UMLTemplate::toString(Uml::SignatureType::Enum sig)
{
Q_UNUSED(sig);
- if (m_pSecondary == NULL || m_pSecondary->name() == QLatin1String("class")) {
+ if (m_pSecondary == 0 || m_pSecondary->name() == QLatin1String("class")) {
return name();
} else {
return name() + QLatin1String(" : ") + m_pSecondary->name();
@@ -71,7 +71,7 @@ QString UMLTemplate::toString(Uml::SignatureType::Enum sig)
*/
QString UMLTemplate::getTypeName() const
{
- if (m_pSecondary == NULL)
+ if (m_pSecondary == 0)
return QLatin1String("class");
return m_pSecondary->name();
}
diff --git a/umbrello/umlmodel/umlcanvasobject.cpp b/umbrello/umlmodel/umlcanvasobject.cpp
index 5c67118..05cc07b 100644
--- a/umbrello/umlmodel/umlcanvasobject.cpp
+++ b/umbrello/umlmodel/umlcanvasobject.cpp
@@ -61,7 +61,7 @@ UMLCanvasObject::~UMLCanvasObject()
UMLAssociationList UMLCanvasObject::getSpecificAssocs(Uml::AssociationType::Enum assocType)
{
UMLAssociationList list;
- UMLObject *o = NULL;
+ UMLObject *o = 0;
for (UMLObjectListIt oit(m_List); oit.hasNext();) {
o = oit.next();
uIgnoreZeroPointer(o);
@@ -240,7 +240,7 @@ QString UMLCanvasObject::uniqChildName(const UMLObject::ObjectType type,
UMLObject * UMLCanvasObject::findChildObject(const QString &n, UMLObject::ObjectType t)
{
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
- UMLObject *obj = NULL;
+ UMLObject *obj = 0;
for (UMLObjectListIt oit(m_List); oit.hasNext();) {
obj = oit.next();
uIgnoreZeroPointer(obj);
@@ -253,7 +253,7 @@ UMLObject * UMLCanvasObject::findChildObject(const QString &n, UMLObject::Object
return obj;
}
}
- return NULL;
+ return 0;
}
/**
@@ -266,7 +266,7 @@ UMLObject * UMLCanvasObject::findChildObject(const QString &n, UMLObject::Object
UMLObject* UMLCanvasObject::findChildObjectById(Uml::ID::Type id, bool considerAncestors)
{
Q_UNUSED(considerAncestors);
- UMLObject *o = NULL;
+ UMLObject *o = 0;
for (UMLObjectListIt oit(m_List); oit.hasNext();) {
o = oit.next();
uIgnoreZeroPointer(o);
@@ -319,7 +319,7 @@ void UMLCanvasObject::copyInto(UMLObject *lhs) const
int UMLCanvasObject::associations()
{
int count = 0;
- UMLObject *obj = NULL;
+ UMLObject *obj = 0;
for (UMLObjectListIt oit(m_List); oit.hasNext();) {
obj = oit.next();
uIgnoreZeroPointer(obj);
@@ -337,7 +337,7 @@ int UMLCanvasObject::associations()
UMLAssociationList UMLCanvasObject::getAssociations()
{
UMLAssociationList assocs;
- UMLObject *o = NULL;
+ UMLObject *o = 0;
for (UMLObjectListIt oit(m_List); oit.hasNext() ;) {
o = oit.next();
uIgnoreZeroPointer(o);
diff --git a/umbrello/umlmodel/umlobject.cpp b/umbrello/umlmodel/umlobject.cpp
index 2c76224..88b347c 100644
--- a/umbrello/umlmodel/umlobject.cpp
+++ b/umbrello/umlmodel/umlobject.cpp
@@ -534,7 +534,7 @@ void UMLObject::setStereotype(const QString &name)
void UMLObject::setStereotypeCmd(const QString& name)
{
if (name.isEmpty()) {
- setUMLStereotype(NULL);
+ setUMLStereotype(0);
return;
}
UMLDoc *pDoc = UMLApp::app()->document();
@@ -557,7 +557,7 @@ UMLStereotype * UMLObject::umlStereotype()
*/
QString UMLObject::stereotype(bool includeAdornments /* = false */) const
{
- if (m_pStereotype == NULL)
+ if (m_pStereotype == 0)
return QString();
return m_pStereotype->name(includeAdornments);
}
@@ -598,7 +598,7 @@ UMLPackageList UMLObject::packages(bool includeRoot) const
{
UMLPackageList pkgList;
UMLPackage* pkg = umlPackage();
- while (pkg != NULL) {
+ while (pkg != 0) {
pkgList.prepend(pkg);
pkg = pkg->umlPackage();
}
@@ -619,7 +619,7 @@ bool UMLObject::setUMLPackage(UMLPackage *pPkg)
return false;
}
- if (pPkg == NULL) {
+ if (pPkg == 0) {
// Allow setting to NULL for stereotypes
setParent(pPkg);
return true;
@@ -749,13 +749,13 @@ bool UMLObject::resolveRef()
// the type is the xmi.id of a UMLClassifier.
if (! m_SecondaryId.isEmpty()) {
m_pSecondary = pDoc->findObjectById(Uml::ID::fromString(m_SecondaryId));
- if (m_pSecondary != NULL) {
+ if (m_pSecondary != 0) {
if (m_pSecondary->baseType() == ot_Stereotype) {
if (m_pStereotype)
m_pStereotype->decrRefCount();
m_pStereotype = m_pSecondary->asUMLStereotype();
m_pStereotype->incrRefCount();
- m_pSecondary = NULL;
+ m_pSecondary = 0;
}
m_SecondaryId = QString();
maybeSignalObjectCreated();
@@ -821,8 +821,8 @@ bool UMLObject::resolveRef()
if (Model_Utils::isCommonDataType(m_SecondaryId))
ot = ot_Datatype;
}
- m_pSecondary = Object_Factory::createUMLObject(ot, m_SecondaryId, NULL);
- if (m_pSecondary == NULL)
+ m_pSecondary = Object_Factory::createUMLObject(ot, m_SecondaryId, 0);
+ if (m_pSecondary == 0)
return false;
m_SecondaryId = QString();
maybeSignalObjectCreated();
@@ -880,7 +880,7 @@ QDomElement UMLObject::save(const QString &tag, QDomDocument & qDoc)
#endif
QString visibility = Uml::Visibility::toString(m_visibility, false);
qElement.setAttribute(QLatin1String("visibility"), visibility);
- if (m_pStereotype != NULL)
+ if (m_pStereotype != 0)
qElement.setAttribute(QLatin1String("stereotype"), Uml::ID::toString(m_pStereotype->id()));
if (m_bStatic)
qElement.setAttribute(QLatin1String("ownerScope"), QLatin1String("classifier"));
diff --git a/umbrello/umlmodel/umlobjectlist.cpp b/umbrello/umlmodel/umlobjectlist.cpp
index fbd5567..33287a4 100644
--- a/umbrello/umlmodel/umlobjectlist.cpp
+++ b/umbrello/umlmodel/umlobjectlist.cpp
@@ -33,7 +33,7 @@ void UMLObjectList::copyInto(UMLObjectList *rhs) const
// Suffering from const; we shall not modify our object.
UMLObjectList *tmp = new UMLObjectList(*this);
- UMLObject *item = NULL;
+ UMLObject *item = 0;
for (UMLObjectListIt oit(*tmp); oit.hasNext() ;)
{
item = oit.next();
diff --git a/umbrello/umlmodel/umlrole.h b/umbrello/umlmodel/umlrole.h
index a77fb1b..554d178 100644
--- a/umbrello/umlmodel/umlrole.h
+++ b/umbrello/umlmodel/umlrole.h
@@ -44,7 +44,7 @@ public:
Uml::RoleType::Enum role() const;
- UMLObject* clone() const { return NULL; }
+ UMLObject* clone() const { return 0; }
void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
diff --git a/umbrello/umlmodel/uniqueconstraint.cpp b/umbrello/umlmodel/uniqueconstraint.cpp
index 6c62a0a..878c3d5 100644
--- a/umbrello/umlmodel/uniqueconstraint.cpp
+++ b/umbrello/umlmodel/uniqueconstraint.cpp
@@ -200,7 +200,7 @@ bool UMLUniqueConstraint::load(QDomElement & element)
UMLObject* obj = parentEnt->findChildObject(attName);
UMLEntityAttribute* entAtt = obj->asUMLEntityAttribute();
- if (entAtt == NULL)
+ if (entAtt == 0)
continue;
m_EntityAttributeList.append(entAtt);
@@ -250,12 +250,12 @@ bool UMLUniqueConstraint::addEntityAttribute(UMLEntityAttribute* attr)
return false;
}
- if (owningParent == NULL) {
+ if (owningParent == 0) {
uError() << name() << ": parent is not a UMLEntity";
return false;
}
- if (owningParent->findChildObjectById(attr->id()) == NULL) {
+ if (owningParent->findChildObjectById(attr->id()) == 0) {
uError()
<< " parent " << owningParent->name()
<< " does not contain attribute " << attr->name();
@@ -278,7 +278,7 @@ bool UMLUniqueConstraint::removeEntityAttribute(UMLEntityAttribute* attr)
{
UMLEntity *owningParent = umlParent()->asUMLEntity();
- if (owningParent == NULL) {
+ if (owningParent == 0) {
uError() << name() << ": parent is not a UMLEntity";
return false;
}
@@ -287,7 +287,7 @@ bool UMLUniqueConstraint::removeEntityAttribute(UMLEntityAttribute* attr)
* The attribute may already be removed from the Entity when this function
* is called. So checking this is not right
*
- * if (owningParent->findChildObjectById(attr->ID()) == NULL) {
+ * if (owningParent->findChildObjectById(attr->ID()) == 0) {
* uError()
* << " parent " << owningParent->getName()
* << " does not contain attribute " << attr->getName();
diff --git a/umbrello/umlscene.cpp b/umbrello/umlscene.cpp
index b87190c..6c0b283 100644
--- a/umbrello/umlscene.cpp
+++ b/umbrello/umlscene.cpp
@@ -896,10 +896,10 @@ ObjectWidget * UMLScene::onWidgetLine(const QPointF &point) const
{
foreach(UMLWidget* obj, m_WidgetList) {
ObjectWidget *ow = obj->asObjectWidget();
- if (ow == NULL)
+ if (ow == 0)
continue;
SeqLineWidget *pLine = ow->sequentialLine();
- if (pLine == NULL) {
+ if (pLine == 0) {
uError() << "SeqLineWidget of " << ow->name()
<< " (id=" << Uml::ID::toString(ow->localID()) << ") is NULL";
continue;
@@ -921,10 +921,10 @@ ObjectWidget * UMLScene::onWidgetDestructionBox(const QPointF &point) const
{
foreach(UMLWidget* obj, m_WidgetList) {
ObjectWidget *ow = obj->asObjectWidget();
- if (ow == NULL)
+ if (ow == 0)
continue;
SeqLineWidget *pLine = ow->sequentialLine();
- if (pLine == NULL) {
+ if (pLine == 0) {
uError() << "SeqLineWidget of " << ow->name()
<< " (id=" << Uml::ID::toString(ow->localID()) << ") is NULL";
continue;
@@ -958,7 +958,7 @@ UMLWidget* UMLScene::widgetAt(const QPointF& p)
UMLWidget *retWid = 0;
foreach (UMLWidget* wid, m_WidgetList) {
UMLWidget* w = wid->onWidget(p);
- if (w == NULL)
+ if (w == 0)
continue;
const qreal s = (w->width() + w->height()) / 2.0;
if (s < relativeSize) {
@@ -1475,13 +1475,13 @@ bool UMLScene::isSavedInSeparateFile()
const QString msgPrefix(QLatin1String("UMLScene::isSavedInSeparateFile(") + name() + QLatin1String("): "));
UMLListView *listView = UMLApp::app()->listView();
UMLListViewItem *lvItem = listView->findItem(m_nID);
- if (lvItem == NULL) {
+ if (lvItem == 0) {
uError() << msgPrefix
<< "listView->findUMLObject(this) returns false";
return false;
}
UMLListViewItem *parentItem = dynamic_cast<UMLListViewItem*>(lvItem->parent());
- if (parentItem == NULL) {
+ if (parentItem == 0) {
uError() << msgPrefix
<< "parent item in listview is not a UMLListViewItem (?)";
return false;
@@ -1490,7 +1490,7 @@ bool UMLScene::isSavedInSeparateFile()
if (! Model_Utils::typeIsFolder(lvt))
return false;
UMLFolder *modelFolder = parentItem->umlObject()->asUMLFolder();
- if (modelFolder == NULL) {
+ if (modelFolder == 0) {
uError() << msgPrefix
<< "parent model object is not a UMLFolder (?)";
return false;
@@ -2023,7 +2023,7 @@ void UMLScene::removeAssocInViewAndDoc(AssociationWidget* a)
return;
if (a->associationType() == Uml::AssociationType::Containment) {
UMLObject *objToBeMoved = a->widgetForRole(Uml::RoleType::B)->umlObject();
- if (objToBeMoved != NULL) {
+ if (objToBeMoved != 0) {
UMLListView *lv = UMLApp::app()->listView();
lv->moveObject(objToBeMoved->id(),
Model_Utils::convert_OT_LVT(objToBeMoved),
@@ -2135,20 +2135,20 @@ void UMLScene::removeAllWidgets()
*/
void UMLScene::updateContainment(UMLCanvasObject *self)
{
- if (self == NULL)
+ if (self == 0)
return;
// See if the object has a widget representation in this view.
// While we're at it, also see if the new parent has a widget here.
- UMLWidget *selfWidget = NULL, *newParentWidget = NULL;
+ UMLWidget *selfWidget = 0, *newParentWidget = 0;
UMLPackage *newParent = self->umlPackage();
foreach(UMLWidget* w, m_WidgetList) {
UMLObject *o = w->umlObject();
if (o == self)
selfWidget = w;
- else if (newParent != NULL && o == newParent)
+ else if (newParent != 0 && o == newParent)
newParentWidget = w;
}
- if (selfWidget == NULL)
+ if (selfWidget == 0)
return;
// Remove possibly obsoleted containment association.
foreach(AssociationWidget* a, m_AssociationList) {
@@ -2171,7 +2171,7 @@ void UMLScene::updateContainment(UMLCanvasObject *self)
// containing object.
break;
}
- if (newParentWidget == NULL)
+ if (newParentWidget == 0)
return;
// Create the new containment association.
AssociationWidget *a = AssociationWidget::create
@@ -2187,7 +2187,7 @@ void UMLScene::updateContainment(UMLCanvasObject *self)
*/
void UMLScene::createAutoAssociations(UMLWidget * widget)
{
- if (widget == NULL ||
+ if (widget == 0 ||
(m_Type != Uml::DiagramType::Class &&
m_Type != Uml::DiagramType::Component &&
m_Type != Uml::DiagramType::Deployment
@@ -2221,24 +2221,24 @@ void UMLScene::createAutoAssociations(UMLWidget * widget)
// end if
// end if
UMLObject *tmpUmlObj = widget->umlObject();
- if (tmpUmlObj == NULL)
+ if (tmpUmlObj == 0)
return;
UMLCanvasObject *umlObj = tmpUmlObj->asUMLCanvasObject();
- if (umlObj == NULL)
+ if (umlObj == 0)
return;
const UMLAssociationList& umlAssocs = umlObj->getAssociations();
Uml::ID::Type myID = umlObj->id();
foreach(UMLAssociation* assoc, umlAssocs) {
- UMLCanvasObject *other = NULL;
+ UMLCanvasObject *other = 0;
UMLObject *roleAObj = assoc->getObject(Uml::RoleType::A);
- if (roleAObj == NULL) {
+ if (roleAObj == 0) {
DEBUG(DBG_SRC) << "roleA object is NULL at UMLAssoc "
<< Uml::ID::toString(assoc->id());
continue;
}
UMLObject *roleBObj = assoc->getObject(Uml::RoleType::B);
- if (roleBObj == NULL) {
+ if (roleBObj == 0) {
DEBUG(DBG_SRC) << "roleB object is NULL at UMLAssoc "
<< Uml::ID::toString(assoc->id());
continue;
@@ -2345,7 +2345,7 @@ void UMLScene::createAutoAssociations(UMLWidget * widget)
}
// if the UMLCanvasObject has a parentPackage then
UMLPackage *parent = umlObj->umlPackage();
- if (parent == NULL)
+ if (parent == 0)
return;
// if the parentPackage has a widget representation on this view then
Uml::ID::Type pkgID = parent->id();
@@ -2374,7 +2374,7 @@ void UMLScene::createAutoAssociations(UMLWidget * widget)
*/
void UMLScene::createAutoAttributeAssociations(UMLWidget *widget)
{
- if (widget == NULL || m_Type != Uml::DiagramType::Class || !m_Options.classState.showAttribAssocs)
+ if (widget == 0 || m_Type != Uml::DiagramType::Class || !m_Options.classState.showAttribAssocs)
return;
// Pseudocode:
@@ -2404,12 +2404,12 @@ void UMLScene::createAutoAttributeAssociations(UMLWidget *widget)
//
// Implementation:
UMLObject *tmpUmlObj = widget->umlObject();
- if (tmpUmlObj == NULL)
+ if (tmpUmlObj == 0)
return;
// if the underlying model object is really a UMLClassifier then
if (tmpUmlObj->isUMLDatatype()) {
UMLDatatype *dt = tmpUmlObj->asUMLDatatype();
- while (dt->originType() != NULL) {
+ while (dt->originType() != 0) {
tmpUmlObj = dt->originType();
if (!tmpUmlObj->isUMLDatatype())
break;
@@ -2443,7 +2443,7 @@ void UMLScene::createAutoAttributeAssociations(UMLWidget *widget)
void UMLScene::createAutoAttributeAssociation(UMLClassifier *type, UMLAttribute *attr,
UMLWidget *widget /*, UMLClassifier * klass*/)
{
- if (type == NULL) {
+ if (type == 0) {
// DEBUG(DBG_SRC) << klass->getName() << ": type is NULL for "
// << "attribute " << attr->getName();
return;
@@ -2453,7 +2453,7 @@ void UMLScene::createAutoAttributeAssociation(UMLClassifier *type, UMLAttribute
// if the attribute type has a widget representation on this view
if (w) {
AssociationWidget *a = findAssocWidget(widget, w, attr->name());
- if (a == NULL &&
+ if (a == 0 &&
// if the current diagram type permits compositions
AssocRules::allowAssociation(assocType, widget, w)) {
// Create a composition AssocWidget, or, if the attribute type is
@@ -2483,7 +2483,7 @@ void UMLScene::createAutoAttributeAssociation(UMLClassifier *type, UMLAttribute
// if the referenced type has a widget representation on this view
if (w) {
AssociationWidget *a = findAssocWidget(widget, w, attr->name());
- if (a == NULL &&
+ if (a == 0 &&
// if the current diagram type permits aggregations
AssocRules::allowAssociation(Uml::AssociationType::Aggregation, widget, w)) {
// create an aggregation AssocWidget from the ClassifierWidget
@@ -2505,7 +2505,7 @@ void UMLScene::createAutoAttributeAssociation(UMLClassifier *type, UMLAttribute
void UMLScene::createAutoConstraintAssociations(UMLWidget *widget)
{
- if (widget == NULL || m_Type != Uml::DiagramType::EntityRelationship)
+ if (widget == 0 || m_Type != Uml::DiagramType::EntityRelationship)
return;
// Pseudocode:
@@ -2520,11 +2520,11 @@ void UMLScene::createAutoConstraintAssociations(UMLWidget *widget)
// end if
UMLObject *tmpUmlObj = widget->umlObject();
- if (tmpUmlObj == NULL)
+ if (tmpUmlObj == 0)
return;
// check if the underlying model object is really a UMLEntity
UMLCanvasObject *umlObj = tmpUmlObj->asUMLCanvasObject();
- if (umlObj == NULL)
+ if (umlObj == 0)
return;
// finished checking whether this widget has a UMLCanvas Object
@@ -2539,12 +2539,12 @@ void UMLScene::createAutoConstraintAssociations(UMLWidget *widget)
UMLEntityConstraint *eConstr = cli->asUMLEntityConstraint();
UMLForeignKeyConstraint* fkc = eConstr->asUMLForeignKeyConstraint();
- if (fkc == NULL) {
+ if (fkc == 0) {
return;
}
UMLEntity* refEntity = fkc->getReferencedEntity();
- if (refEntity == NULL) {
+ if (refEntity == 0) {
return;
}
@@ -2554,17 +2554,17 @@ void UMLScene::createAutoConstraintAssociations(UMLWidget *widget)
void UMLScene::createAutoConstraintAssociation(UMLEntity* refEntity, UMLForeignKeyConstraint* fkConstraint, UMLWidget* widget)
{
- if (refEntity == NULL) {
+ if (refEntity == 0) {
return;
}
Uml::AssociationType::Enum assocType = Uml::AssociationType::Relationship;
UMLWidget *w = findWidget(refEntity->id());
- AssociationWidget *aw = NULL;
+ AssociationWidget *aw = 0;
if (w) {
aw = findAssocWidget(w, widget, fkConstraint->name());
- if (aw == NULL &&
+ if (aw == 0 &&
// if the current diagram type permits relationships
AssocRules::allowAssociation(assocType, w, widget)) {
@@ -2614,7 +2614,7 @@ void UMLScene::createAutoAttributeAssociations2(UMLWidget *widget)
*/
void UMLScene::findMaxBoundingRectangle(const FloatingTextWidget* ft, qreal& px, qreal& py, qreal& qx, qreal& qy)
{
- if (ft == NULL || !ft->isVisible())
+ if (ft == 0 || !ft->isVisible())
return;
qreal x = ft->x();
@@ -3533,7 +3533,7 @@ void UMLScene::saveToXMI(QDomDocument & qDoc, QDomElement & qElement)
// section when each owning association is dumped. -b.t.
if ((!widget->isTextWidget() &&
!widget->isFloatingDashLineWidget()) ||
- widget->asFloatingTextWidget()->link() == NULL)
+ widget->asFloatingTextWidget()->link() == 0)
widget->saveToXMI(qDoc, widgetElement);
}
viewElement.appendChild(widgetElement);
@@ -3693,7 +3693,7 @@ bool UMLScene::loadWidgetsFromXMI(QDomElement & qElement)
m_WidgetList.append(widget);
widget->clipSize();
// In the interest of best-effort loading, in case of a
- // (widget == NULL) we still go on.
+ // (widget == 0) we still go on.
// The individual widget's loadFromXMI method should
// already have generated an error message to tell the
// user that something went wrong.
@@ -3719,8 +3719,8 @@ UMLWidget* UMLScene::loadWidgetFromXMI(QDomElement& widgetElement)
QString idstr = widgetElement.attribute(QLatin1String("xmi.id"), QLatin1String("-1"));
UMLWidget* widget = Widget_Factory::makeWidgetFromXMI(tag, idstr, this);
- if (widget == NULL)
- return NULL;
+ if (widget == 0)
+ return 0;
if (!widget->loadFromXMI(widgetElement)) {
widget->cleanup();
delete widget;
@@ -3843,12 +3843,12 @@ bool UMLScene::loadUisDiagramPresentation(QDomElement & qElement)
}
Uml::ID::Type id = Uml::ID::fromString(idStr);
UMLObject *o = m_doc->findObjectById(id);
- if (o == NULL) {
+ if (o == 0) {
uError() << "Cannot find object for id " << idStr;
} else {
UMLObject::ObjectType ot = o->baseType();
DEBUG(DBG_SRC) << "Create widget for model object of type " << UMLObject::toString(ot);
- UMLWidget *widget = NULL;
+ UMLWidget *widget = 0;
switch (ot) {
case UMLObject::ot_Class:
widget = new ClassifierWidget(this, o->asUMLClassifier());
@@ -3858,13 +3858,13 @@ bool UMLScene::loadUisDiagramPresentation(QDomElement & qElement)
Uml::AssociationType::Enum at = umla->getAssocType();
UMLObject* objA = umla->getObject(Uml::RoleType::A);
UMLObject* objB = umla->getObject(Uml::RoleType::B);
- if (objA == NULL || objB == NULL) {
+ if (objA == 0 || objB == 0) {
uError() << "intern err 1";
return false;
}
UMLWidget *wA = findWidget(objA->id());
UMLWidget *wB = findWidget(objB->id());
- if (wA != NULL && wB != NULL) {
+ if (wA != 0 && wB != 0) {
AssociationWidget *aw =
AssociationWidget::create(this, wA, at, wB, umla);
aw->syncToModel();
@@ -3908,7 +3908,7 @@ bool UMLScene::loadUISDiagram(QDomElement & qElement)
if (idStr.isEmpty())
return false;
m_nID = Uml::ID::fromString(idStr);
- UMLListViewItem *ulvi = NULL;
+ UMLListViewItem *ulvi = 0;
for (QDomNode node = qElement.firstChild(); !node.isNull(); node = node.nextSibling()) {
if (node.isComment())
continue;
@@ -4081,7 +4081,7 @@ void UMLScene::alignVerticalDistribute()
qSort(widgetList.begin(), widgetList.end(), Widget_Utils::hasSmallerY);
int i = 1;
- UMLWidget* widgetPrev = NULL;
+ UMLWidget* widgetPrev = 0;
foreach(UMLWidget *widget, widgetList) {
if (i == 1) {
widgetPrev = widget;
@@ -4112,7 +4112,7 @@ void UMLScene::alignHorizontalDistribute()
qSort(widgetList.begin(), widgetList.end(), Widget_Utils::hasSmallerX);
int i = 1;
- UMLWidget* widgetPrev = NULL;
+ UMLWidget* widgetPrev = 0;
foreach(UMLWidget *widget, widgetList) {
if (i == 1) {
widgetPrev = widget;
diff --git a/umbrello/umlwidgets/associationwidget.cpp b/umbrello/umlwidgets/associationwidget.cpp
index 230f212..66e7481 100644
--- a/umbrello/umlwidgets/associationwidget.cpp
+++ b/umbrello/umlwidgets/associationwidget.cpp
@@ -136,7 +136,7 @@ AssociationWidget* AssociationWidget::create(UMLScene *scene)
AssociationWidget* AssociationWidget::create
(UMLScene *scene, UMLWidget* pWidgetA,
Uml::AssociationType::Enum assocType, UMLWidget* pWidgetB,
- UMLObject *umlobject /* = NULL */)
+ UMLObject *umlobject /* = 0 */)
{
AssociationWidget* instance = new AssociationWidget(scene);
if (umlobject) {
@@ -146,7 +146,7 @@ AssociationWidget* AssociationWidget::create
if (Uml::AssociationType::hasUMLRepresentation(assocType)) {
UMLObject* umlRoleA = pWidgetA->umlObject();
UMLObject* umlRoleB = pWidgetB->umlObject();
- if (umlRoleA != NULL && umlRoleB != NULL) {
+ if (umlRoleA != 0 && umlRoleB != 0) {
bool swap;
// This is not correct. We could very easily have more than one
@@ -157,7 +157,7 @@ AssociationWidget* AssociationWidget::create
// output is shown, in case there is a collision with code elsewhere.
UMLDoc *doc = UMLApp::app()->document();
UMLAssociation *myAssoc = doc->findAssociation(assocType, umlRoleA, umlRoleB, &swap);
- if (myAssoc != NULL) {
+ if (myAssoc != 0) {
switch (assocType) {
case Uml::AssociationType::Generalization:
case Uml::AssociationType::Dependency:
@@ -176,11 +176,11 @@ AssociationWidget* AssociationWidget::create
<< umlRoleB->name() << "as an already existing assoc (swap="
<< swap << ")";
// now, just create a new association anyways
- myAssoc = NULL;
+ myAssoc = 0;
break;
}
}
- if (myAssoc == NULL) {
+ if (myAssoc == 0) {
myAssoc = new UMLAssociation(assocType, umlRoleA, umlRoleB);
// CHECK: myAssoc is not yet inserted at any parent UMLPackage -
// need to check carefully that all callers do this, lest it be
@@ -237,11 +237,11 @@ AssociationWidget::~AssociationWidget()
void AssociationWidget::setUMLObject(UMLObject *obj)
{
WidgetBase::setUMLObject(obj);
- if (obj == NULL)
+ if (obj == 0)
return;
- UMLClassifier *klass = NULL;
- UMLAttribute *attr = NULL;
- UMLEntity *ent = NULL;
+ UMLClassifier *klass = 0;
+ UMLAttribute *attr = 0;
+ UMLEntity *ent = 0;
const UMLObject::ObjectType ot = obj->baseType();
switch (ot) {
case UMLObject::ot_Association:
@@ -399,7 +399,7 @@ void AssociationWidget::setMessageText(FloatingTextWidget *ft)
{
if (isCollaboration()) {
ft->setSequenceNumber(m_SequenceNumber);
- if (m_umlObject != NULL) {
+ if (m_umlObject != 0) {
ft->setText(operationText(m_scene));
} else {
ft->setText(name());
@@ -565,8 +565,8 @@ void AssociationWidget::calculateNameTextSegment()
*/
UMLAssociation* AssociationWidget::association() const
{
- if (m_umlObject == NULL || m_umlObject->baseType() != UMLObject::ot_Association)
- return NULL;
+ if (m_umlObject == 0 || m_umlObject->baseType() != UMLObject::ot_Association)
+ return 0;
return m_umlObject->asUMLAssociation();
}
@@ -578,11 +578,11 @@ UMLAssociation* AssociationWidget::association() const
*/
UMLAttribute* AssociationWidget::attribute() const
{
- if (m_umlObject == NULL)
- return NULL;
+ if (m_umlObject == 0)
+ return 0;
UMLObject::ObjectType ot = m_umlObject->baseType();
if (ot != UMLObject::ot_Attribute && ot != UMLObject::ot_EntityAttribute)
- return NULL;
+ return 0;
return m_umlObject->asUMLAttribute();
}
@@ -598,7 +598,7 @@ AssociationWidget& AssociationWidget::operator=(const AssociationWidget& other)
m_nameWidget = new FloatingTextWidget(m_scene);
*m_nameWidget = *(other.m_nameWidget);
} else {
- m_nameWidget = NULL;
+ m_nameWidget = 0;
}
for (unsigned r = (unsigned)A; r <= (unsigned)B; ++r) {
@@ -611,21 +611,21 @@ AssociationWidget& AssociationWidget::operator=(const AssociationWidget& other)
lhs.multiplicityWidget = new FloatingTextWidget(m_scene);
*(lhs.multiplicityWidget) = *(rhs.multiplicityWidget);
} else {
- lhs.multiplicityWidget = NULL;
+ lhs.multiplicityWidget = 0;
}
if (rhs.roleWidget) {
lhs.roleWidget = new FloatingTextWidget(m_scene);
*(lhs.roleWidget) = *(rhs.roleWidget);
} else {
- lhs.roleWidget = NULL;
+ lhs.roleWidget = 0;
}
if (rhs.changeabilityWidget) {
lhs.changeabilityWidget = new FloatingTextWidget(m_scene);
*(lhs.changeabilityWidget) = *(rhs.changeabilityWidget);
} else {
- lhs.changeabilityWidget = NULL;
+ lhs.changeabilityWidget = 0;
}
lhs.umlWidget = rhs.umlWidget;
@@ -651,7 +651,7 @@ bool AssociationWidget::operator==(const AssociationWidget& other) const
return true;
// if no model representation exists, then the widgets are not equal
- if (association() == NULL && other.association() == NULL)
+ if (association() == 0 && other.association() == 0)
return false;
if (!m_umlObject || !other.m_umlObject ) {
@@ -718,10 +718,10 @@ AssociationLine* AssociationWidget::associationLine() const
*/
bool AssociationWidget::activate()
{
- if (m_umlObject == NULL &&
+ if (m_umlObject == 0 &&
AssociationType::hasUMLRepresentation(m_associationType)) {
UMLObject *myObj = umlDoc()->findObjectById(m_nId);
- if (myObj == NULL) {
+ if (myObj == 0) {
uError() << "cannot find UMLObject " << Uml::ID::toString(m_nId);
return false;
} else {
@@ -741,9 +741,9 @@ bool AssociationWidget::activate()
Uml::AssociationType::Enum type = associationType();
- if (m_role[RoleType::A].umlWidget == NULL)
+ if (m_role[RoleType::A].umlWidget == 0)
setWidgetForRole(m_scene->findWidget(widgetIDForRole(RoleType::A)), RoleType::A);
- if (m_role[RoleType::B].umlWidget == NULL)
+ if (m_role[RoleType::B].umlWidget == 0)
setWidgetForRole(m_scene->findWidget(widgetIDForRole(RoleType::B)), RoleType::B);
if (!m_role[RoleType::A].umlWidget || !m_role[RoleType::B].umlWidget) {
@@ -756,7 +756,7 @@ bool AssociationWidget::activate()
if (AssocRules::allowRole(type)) {
for (unsigned r = RoleType::A; r <= RoleType::B; ++r) {
WidgetRole& robj = m_role[r];
- if (robj.roleWidget == NULL)
+ if (robj.roleWidget == 0)
continue;
robj.roleWidget->setLink(this);
TextRole::Enum tr = (r == RoleType::A ? TextRole::RoleAName : TextRole::RoleBName);
@@ -774,7 +774,7 @@ bool AssociationWidget::activate()
}
}
- if (m_nameWidget != NULL) {
+ if (m_nameWidget != 0) {
m_nameWidget->setLink(this);
m_nameWidget->setTextRole(calculateNameType(TextRole::Name));
@@ -791,7 +791,7 @@ bool AssociationWidget::activate()
WidgetRole& robj = m_role[r];
FloatingTextWidget* pMulti = robj.multiplicityWidget;
- if (pMulti != NULL &&
+ if (pMulti != 0 &&
AssocRules::allowMultiplicity(type, robj.umlWidget->baseType())) {
pMulti->setLink(this);
TextRole::Enum tr = (r == RoleType::A ? TextRole::MultiA : TextRole::MultiB);
@@ -804,7 +804,7 @@ bool AssociationWidget::activate()
}
FloatingTextWidget* pChangeWidget = robj.changeabilityWidget;
- if (pChangeWidget != NULL) {
+ if (pChangeWidget != 0) {
pChangeWidget->setLink(this);
TextRole::Enum tr = (r == RoleType::A ? TextRole::ChangeA : TextRole::ChangeB);
pChangeWidget->setTextRole(tr);
@@ -908,7 +908,7 @@ FloatingTextWidget* AssociationWidget::textWidgetByRole(Uml::TextRole::Enum tr)
default:
break;
}
- return NULL;
+ return 0;
}
/**
@@ -918,7 +918,7 @@ FloatingTextWidget* AssociationWidget::textWidgetByRole(Uml::TextRole::Enum tr)
*/
QString AssociationWidget::name() const
{
- if (m_nameWidget == NULL)
+ if (m_nameWidget == 0)
return QString();
return m_nameWidget->text();
}
@@ -949,7 +949,7 @@ void AssociationWidget::setName(const QString &strName)
if (! FloatingTextWidget::isTextValid(strName)) {
//m_nameWidget->hide();
m_scene->removeWidget(m_nameWidget);
- m_nameWidget = NULL;
+ m_nameWidget = 0;
return;
}
}
@@ -984,7 +984,7 @@ void AssociationWidget::setStereotype(const QString &stereo) {
*/
QString AssociationWidget::roleName(Uml::RoleType::Enum role) const
{
- if (m_role[role].roleWidget == NULL)
+ if (m_role[role].roleWidget == 0)
return QString();
return m_role[role].roleWidget->text();
}
@@ -1037,7 +1037,7 @@ void AssociationWidget::setRoleDocumentation(const QString &doc, Uml::RoleType::
*/
QString AssociationWidget::roleDocumentation(Uml::RoleType::Enum role) const
{
- if (m_umlObject == NULL || m_umlObject->baseType() != UMLObject::ot_Association)
+ if (m_umlObject == 0 || m_umlObject->baseType() != UMLObject::ot_Association)
return QString();
UMLAssociation *umla = m_umlObject->asUMLAssociation();
return umla->getRoleDoc(role);
@@ -1064,12 +1064,12 @@ void AssociationWidget::setFloatingText(Uml::TextRole::Enum role,
if (ft) {
// Remove preexisting FloatingTextWidget
m_scene->removeWidget(ft); // physically deletes ft
- ft = NULL;
+ ft = 0;
}
return;
}
- if (ft == NULL) {
+ if (ft == 0) {
ft = new FloatingTextWidget(m_scene, role, text);
ft->setParentItem(this);
ft->setLink(this);
@@ -1093,7 +1093,7 @@ void AssociationWidget::setFloatingText(Uml::TextRole::Enum role,
*/
QString AssociationWidget::multiplicity(Uml::RoleType::Enum role) const
{
- if (m_role[role].multiplicityWidget == NULL)
+ if (m_role[role].multiplicityWidget == 0)
return QString();
return m_role[role].multiplicityWidget->text();
}
@@ -1155,7 +1155,7 @@ void AssociationWidget::setVisibility(Visibility::Enum value, Uml::RoleType::Enu
*/
Uml::Changeability::Enum AssociationWidget::changeability(Uml::RoleType::Enum role) const
{
- if (m_umlObject == NULL || m_umlObject->baseType() != UMLObject::ot_Association)
+ if (m_umlObject == 0 || m_umlObject->baseType() != UMLObject::ot_Association)
return m_role[role].changeability;
UMLAssociation *umla = m_umlObject->asUMLAssociation();
return umla->changeability(role);
@@ -1410,7 +1410,7 @@ void AssociationWidget::setUMLAssociation (UMLAssociation * assoc)
//umla->deleteLater();
}
- m_umlObject = NULL;
+ m_umlObject = 0;
}
if (assoc) {
@@ -1460,7 +1460,7 @@ bool AssociationWidget::isSelf() const
*/
Uml::AssociationType::Enum AssociationWidget::associationType() const
{
- if (m_umlObject == NULL || m_umlObject->baseType() != UMLObject::ot_Association)
+ if (m_umlObject == 0 || m_umlObject->baseType() != UMLObject::ot_Association)
return m_associationType;
UMLAssociation *umla = m_umlObject->asUMLAssociation();
return umla->getAssocType();
@@ -1509,7 +1509,7 @@ void AssociationWidget::setAssociationType(Uml::AssociationType::Enum type)
*/
Uml::ID::Type AssociationWidget::widgetIDForRole(Uml::RoleType::Enum role) const
{
- if (m_role[role].umlWidget == NULL) {
+ if (m_role[role].umlWidget == 0) {
if (m_umlObject && m_umlObject->baseType() == UMLObject::ot_Association) {
UMLAssociation *umla = m_umlObject->asUMLAssociation();
return umla->getObjectId(role);
@@ -1528,7 +1528,7 @@ Uml::ID::Type AssociationWidget::widgetIDForRole(Uml::RoleType::Enum role) const
*/
Uml::ID::Type AssociationWidget::widgetLocalIDForRole(Uml::RoleType::Enum role) const
{
- if (m_role[role].umlWidget == NULL) {
+ if (m_role[role].umlWidget == 0) {
if (m_umlObject && m_umlObject->baseType() == UMLObject::ot_Association) {
UMLAssociation *umla = m_umlObject->asUMLAssociation();
return umla->getObjectId(role);
@@ -1829,9 +1829,9 @@ void AssociationWidget::syncToModel()
{
UMLAssociation *uml = association();
- if (uml == NULL) {
+ if (uml == 0) {
UMLAttribute *attr = attribute();
- if (attr == NULL)
+ if (attr == 0)
return;
setVisibility(attr->visibility(), RoleType::B);
setRoleName(attr->name(), RoleType::B);
@@ -1863,7 +1863,7 @@ void AssociationWidget::mergeAssociationDataIntoUMLRepresentation()
{
UMLAssociation *umlassoc = association();
UMLAttribute *umlattr = attribute();
- if (umlassoc == NULL && umlattr == NULL)
+ if (umlassoc == 0 && umlattr == 0)
return;
// block emit modified signal, or we get a horrible loop
@@ -2791,7 +2791,7 @@ void AssociationWidget::setTextPosition(Uml::TextRole::Enum role)
return;
}
FloatingTextWidget *ft = textWidgetByRole(role);
- if (ft == NULL)
+ if (ft == 0)
return;
QPointF pos = calculateTextPosition(role);
ft->setX(pos.x());
@@ -2824,7 +2824,7 @@ void AssociationWidget::setTextPositionRelatively(Uml::TextRole::Enum role, cons
return;
}
FloatingTextWidget *ft = textWidgetByRole(role);
- if (ft == NULL)
+ if (ft == 0)
return;
qreal ftX = ft->x();
qreal ftY = ft->y();
@@ -2864,7 +2864,7 @@ void AssociationWidget::removeAssocClassLine()
*/
void AssociationWidget::createAssocClassLine()
{
- if (m_pAssocClassLine == NULL) {
+ if (m_pAssocClassLine == 0) {
m_pAssocClassLine = new QGraphicsLineItem(this);
}
QPen pen(lineColor(), lineWidth(), Qt::DashLine);
@@ -2909,7 +2909,7 @@ void AssociationWidget::createAssocClassLine(ClassifierWidget* classifier,
*/
void AssociationWidget::computeAssocClassLine()
{
- if (m_associationClass == NULL || m_pAssocClassLine == NULL) {
+ if (m_associationClass == 0 || m_pAssocClassLine == 0) {
return;
}
if (m_nLinePathSegmentIndex < 0) {
@@ -3053,18 +3053,18 @@ void AssociationWidget::slotMenuSelection(QAction* action)
i18n("Multiplicity"),
i18n("Enter multiplicity:"),
QLineEdit::Normal,
- oldText, NULL);
+ oldText, 0);
#else
newText = KInputDialog::getText(i18n("Multiplicity"),
i18n("Enter multiplicity:"),
- oldText, NULL, m_scene->activeView(), &v);
+ oldText, 0, m_scene->activeView(), &v);
#endif
if (newText != oldText) {
if (FloatingTextWidget::isTextValid(newText)) {
setMultiplicity(newText, r);
} else {
m_scene->removeWidget(m_role[r].multiplicityWidget);
- m_role[r].multiplicityWidget = NULL;
+ m_role[r].multiplicityWidget = 0;
}
}
break;
@@ -3079,18 +3079,18 @@ void AssociationWidget::slotMenuSelection(QAction* action)
i18n("Association Name"),
i18n("Enter association name:"),
QLineEdit::Normal,
- oldText, NULL);
+ oldText, 0);
#else
newText = KInputDialog::getText(i18n("Association Name"),
i18n("Enter association name:"),
- oldText, NULL, m_scene->activeView(), &v);
+ oldText, 0, m_scene->activeView(), &v);
#endif
if (newText != oldText) {
if (FloatingTextWidget::isTextValid(newText)) {
setName(newText);
} else if (m_nameWidget) {
m_scene->removeWidget(m_nameWidget);
- m_nameWidget = NULL;
+ m_nameWidget = 0;
}
}
break;
@@ -3107,18 +3107,18 @@ void AssociationWidget::slotMenuSelection(QAction* action)
i18n("Role Name"),
i18n("Enter role name:"),
QLineEdit::Normal,
- oldText, NULL);
+ oldText, 0);
#else
newText = KInputDialog::getText(i18n("Role Name"),
i18n("Enter role name:"),
- oldText, NULL, m_scene->activeView(), &v);
+ oldText, 0, m_scene->activeView(), &v);
#endif
if (newText != oldText) {
if (FloatingTextWidget::isTextValid(newText)) {
setRoleName(newText, r);
} else {
m_scene->removeWidget(m_role[r].roleWidget);
- m_role[r].roleWidget = NULL;
+ m_role[r].roleWidget = 0;
}
}
break;
@@ -3377,7 +3377,7 @@ void AssociationWidget::mouseMoveEvent(QGraphicsSceneMouseEvent* me)
*/
int AssociationWidget::getRegionCount(Uml::Region::Enum region, Uml::RoleType::Enum role)
{
- if ((region == Uml::Region::Error) | (umlScene() == NULL)) {
+ if ((region == Uml::Region::Error) | (umlScene() == 0)) {
return 0;
}
int widgetCount = 0;
@@ -3540,7 +3540,7 @@ void AssociationWidget::updateAssociations(int totalCount,
Uml::Region::Enum region,
Uml::RoleType::Enum role)
{
- if ((region == Uml::Region::Error) | (umlScene() == NULL)) {
+ if ((region == Uml::Region::Error) | (umlScene() == 0)) {
return;
}
AssociationWidgetList list = m_scene->associationList();
@@ -3616,7 +3616,7 @@ void AssociationWidget::updateRegionLineCount(int index, int totalCount,
Uml::Region::Enum region,
Uml::RoleType::Enum role)
{
- if ((region == Uml::Region::Error) | (umlScene() == NULL)) {
+ if ((region == Uml::Region::Error) | (umlScene() == 0)) {
return;
}
// If the association is to self and the line ends are on the same region then
@@ -3805,11 +3805,11 @@ void AssociationWidget::setSelected(bool _select /* = true */)
*
* @param p Point to be checked.
*
- * @return m_nameWidget if m_nameWidget is non NULL and m_nameWidget->onWidget(p) returns non NULL;
+ * @return m_nameWidget if m_nameWidget is non NULL and m_nameWidget->onWidget(p) returns non 0;
* m_role[0].(multiplicity|changeability|role)Widget if the resp. widget is non NULL and
- * its onWidget(p) returns non NULL;
+ * its onWidget(p) returns non 0;
* m_role[1].(multiplicity|changeability|role)Widget if the resp. widget is non NULL and
- * its onWidget(p) returns non NULL;
+ * its onWidget(p) returns non 0;
* else NULL.
*/
UMLWidget* AssociationWidget::onWidget(const QPointF &p)
@@ -3826,7 +3826,7 @@ UMLWidget* AssociationWidget::onWidget(const QPointF &p)
if (r.roleWidget && r.roleWidget->onWidget(p))
return r.roleWidget;
}
- return NULL;
+ return 0;
}
/**
@@ -3973,7 +3973,7 @@ void AssociationWidget::slotClassifierListItemRemoved(UMLClassifierListItem* obj
void AssociationWidget::slotAttributeChanged()
{
UMLAttribute *attr = attribute();
- if (attr == NULL) {
+ if (attr == 0) {
uError() << "attribute() returns NULL";
return;
}
@@ -4105,7 +4105,7 @@ void AssociationWidget::saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
assocElement.setAttribute(QLatin1String("visibilityB"), visibility(RoleType::B));
assocElement.setAttribute(QLatin1String("changeabilityA"), changeability(RoleType::A));
assocElement.setAttribute(QLatin1String("changeabilityB"), changeability(RoleType::B));
- if (m_umlObject == NULL) {
+ if (m_umlObject == 0) {
assocElement.setAttribute(QLatin1String("roleAdoc"), roleDocumentation(RoleType::A));
assocElement.setAttribute(QLatin1String("roleBdoc"), roleDocumentation(RoleType::B));
assocElement.setAttribute(QLatin1String("documentation"), documentation());
diff --git a/umbrello/umlwidgets/associationwidget.h b/umbrello/umlwidgets/associationwidget.h
index ae32217..ac4c454 100644
--- a/umbrello/umlwidgets/associationwidget.h
+++ b/umbrello/umlwidgets/associationwidget.h
@@ -55,7 +55,7 @@ public:
static AssociationWidget* create
(UMLScene *scene, UMLWidget* WidgetA,
Uml::AssociationType::Enum assocType, UMLWidget* WidgetB,
- UMLObject *umlobject = NULL);
+ UMLObject *umlobject = 0);
virtual ~AssociationWidget();
diff --git a/umbrello/umlwidgets/classifierwidget.cpp b/umbrello/umlwidgets/classifierwidget.cpp
index 8c44b09..1274607 100644
--- a/umbrello/umlwidgets/classifierwidget.cpp
+++ b/umbrello/umlwidgets/classifierwidget.cpp
@@ -661,7 +661,7 @@ void ClassifierWidget::setClassAssociationWidget(AssociationWidget *assocwidget)
return;
}
m_pAssocWidget = assocwidget;
- UMLAssociation *umlassoc = NULL;
+ UMLAssociation *umlassoc = 0;
if (assocwidget)
umlassoc = assocwidget->association();
classifier()->setClassAssoc(umlassoc);
@@ -1053,19 +1053,19 @@ void ClassifierWidget::drawMembers(QPainter * painter, UMLObject::ObjectType ot,
*
* @param p Point to be checked.
*
- * @return 'this' if UMLWidget::onWidget(p) returns non NULL;
+ * @return 'this' if UMLWidget::onWidget(p) returns non 0;
* m_pInterfaceName if m_pName is non NULL and
- * m_pInterfaceName->onWidget(p) returns non NULL; else NULL.
+ * m_pInterfaceName->onWidget(p) returns non 0; else NULL.
*/
UMLWidget* ClassifierWidget::onWidget(const QPointF &p)
{
- if (UMLWidget::onWidget(p) != NULL)
+ if (UMLWidget::onWidget(p) != 0)
return this;
if (getDrawAsCircle() && m_pInterfaceName) {
uDebug() << "floatingtext: " << m_pInterfaceName->text();
return m_pInterfaceName->onWidget(p);
}
- return NULL;
+ return 0;
}
/**
@@ -1077,7 +1077,7 @@ UMLWidget* ClassifierWidget::widgetWithID(Uml::ID::Type id)
return this;
if (getDrawAsCircle() && m_pInterfaceName && m_pInterfaceName->widgetWithID(id))
return m_pInterfaceName;
- return NULL;
+ return 0;
}
void ClassifierWidget::setDocumentation(const QString &doc)
@@ -1264,7 +1264,7 @@ bool ClassifierWidget::loadFromXMI(QDomElement & qElement)
if (!element.isNull()) {
QString tag = element.tagName();
if (tag == QLatin1String("floatingtext")) {
- if (m_pInterfaceName == NULL) {
+ if (m_pInterfaceName == 0) {
m_pInterfaceName = new FloatingTextWidget(m_scene,
Uml::TextRole::Floating,
name(), Uml::ID::Reserved);
@@ -1273,7 +1273,7 @@ bool ClassifierWidget::loadFromXMI(QDomElement & qElement)
if (!m_pInterfaceName->loadFromXMI(element)) {
// Most likely cause: The FloatingTextWidget is empty.
delete m_pInterfaceName;
- m_pInterfaceName = NULL;
+ m_pInterfaceName = 0;
} else {
m_pInterfaceName->activate();
m_pInterfaceName->update();
diff --git a/umbrello/umlwidgets/combinedfragmentwidget.cpp b/umbrello/umlwidgets/combinedfragmentwidget.cpp
index dd821aa..283532d 100644
--- a/umbrello/umlwidgets/combinedfragmentwidget.cpp
+++ b/umbrello/umlwidgets/combinedfragmentwidget.cpp
@@ -320,7 +320,7 @@ void CombinedFragmentWidget::askNameForWidgetType(UMLWidget* &targetWidget, cons
} else {
targetWidget->cleanup();
delete targetWidget;
- targetWidget = NULL;
+ targetWidget = 0;
}
}
diff --git a/umbrello/umlwidgets/componentwidget.cpp b/umbrello/umlwidgets/componentwidget.cpp
index c8bab14..5db4ceb 100644
--- a/umbrello/umlwidgets/componentwidget.cpp
+++ b/umbrello/umlwidgets/componentwidget.cpp
@@ -56,7 +56,7 @@ void ComponentWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *o
Q_UNUSED(widget);
UMLComponent *umlcomp = m_umlObject->asUMLComponent();
- if (umlcomp == NULL)
+ if (umlcomp == 0)
return;
setPenFromSettings(painter);
QPen origPen = painter->pen();
diff --git a/umbrello/umlwidgets/floatingtextwidget.cpp b/umbrello/umlwidgets/floatingtextwidget.cpp
index ebbcf34..d0b501e 100644
--- a/umbrello/umlwidgets/floatingtextwidget.cpp
+++ b/umbrello/umlwidgets/floatingtextwidget.cpp
@@ -641,13 +641,13 @@ void FloatingTextWidget::constrainMovementForAllWidgets(qreal &diffX, qreal &dif
*
* @param p Point to be checked.
*
- * @return 'this' if UMLWidget::onWidget(p) returns non NULL;
+ * @return 'this' if UMLWidget::onWidget(p) returns non 0;
* else NULL.
*/
UMLWidget* FloatingTextWidget::onWidget(const QPointF &p)
{
WidgetBase *pw = dynamic_cast<WidgetBase*>(parentItem());
- if (pw == NULL) {
+ if (pw == 0) {
return WidgetBase::onWidget(p);
}
const WidgetBase::WidgetType t = pw->baseType();
@@ -676,7 +676,7 @@ UMLWidget* FloatingTextWidget::onWidget(const QPointF &p)
// uDebug() << "floatingtext: " << m_Text;
return this;
}
- return NULL;
+ return 0;
}
/**
diff --git a/umbrello/umlwidgets/linkwidget.cpp b/umbrello/umlwidgets/linkwidget.cpp
index 246f39b..cc95ef8 100644
--- a/umbrello/umlwidgets/linkwidget.cpp
+++ b/umbrello/umlwidgets/linkwidget.cpp
@@ -32,8 +32,8 @@ LinkWidget::~LinkWidget()
UMLClassifier *LinkWidget::operationOwner()
{
UMLOperation *op = operation();
- if (op == NULL)
- return NULL;
+ if (op == 0)
+ return 0;
return op->umlParent()->asUMLClassifier();
}
@@ -47,9 +47,9 @@ UMLClassifier *LinkWidget::operationOwner()
QString LinkWidget::operationText(UMLScene *scene)
{
UMLOperation *op = operation();
- if (op == NULL)
+ if (op == 0)
return customOpText();
- if (scene == NULL)
+ if (scene == 0)
scene = UMLApp::app()->currentView()->umlScene();
Uml::SignatureType::Enum sigType;
if (scene && scene->showOpSig())
diff --git a/umbrello/umlwidgets/messagewidget.cpp b/umbrello/umlwidgets/messagewidget.cpp
index edd5fa0..4ea6f41 100644
--- a/umbrello/umlwidgets/messagewidget.cpp
+++ b/umbrello/umlwidgets/messagewidget.cpp
@@ -130,8 +130,8 @@ void MessageWidget::init()
m_yclicked = -1;
m_ignoreSnapToGrid = true;
m_ignoreSnapComponentSizeToGrid = true;
- m_pOw[Uml::RoleType::A] = m_pOw[Uml::RoleType::B] = NULL;
- m_pFText = NULL;
+ m_pOw[Uml::RoleType::A] = m_pOw[Uml::RoleType::B] = 0;
+ m_pFText = 0;
}
/**
@@ -605,17 +605,17 @@ UMLWidget* MessageWidget::onWidget(const QPointF& p)
// Synchronous message:
// Consists of top arrow (call) and bottom arrow (return.)
if (p.x() < x() || p.x() > x() + width())
- return NULL;
+ return 0;
const int tolerance = 5; // pixels
const int pY = p.y();
const int topArrowY = y() + 3;
const int bottomArrowY = y() + height() - 3;
if (pY < topArrowY - tolerance || pY > bottomArrowY + tolerance)
- return NULL;
+ return 0;
if (height() <= 2 * tolerance)
return this;
if (pY > topArrowY + tolerance && pY < bottomArrowY - tolerance)
- return NULL;
+ return 0;
return this;
}
@@ -624,7 +624,7 @@ UMLWidget* MessageWidget::onWidget(const QPointF& p)
*/
void MessageWidget::setTextPosition()
{
- if (m_pFText == NULL) {
+ if (m_pFText == 0) {
DEBUG(DBG_SRC) << "m_pFText is NULL";
return;
}
@@ -649,7 +649,7 @@ int MessageWidget::constrainX(int textX, int textWidth, Uml::TextRole::Enum tr)
if (textX < minTextX || tr == Uml::TextRole::Seq_Message_Self) {
result = minTextX;
} else {
- ObjectWidget *objectAtRight = NULL;
+ ObjectWidget *objectAtRight = 0;
if (m_pOw[Uml::RoleType::B]->x() > m_pOw[Uml::RoleType::A]->x())
objectAtRight = m_pOw[Uml::RoleType::B];
else
@@ -784,27 +784,27 @@ bool MessageWidget::activate(IDChangeLog * /*Log = 0*/)
{
m_scene->resetPastePoint();
// UMLWidget::activate(Log); CHECK: I don't think we need this ?
- if (m_pOw[Uml::RoleType::A] == NULL) {
+ if (m_pOw[Uml::RoleType::A] == 0) {
UMLWidget *pWA = m_scene->findWidget(m_widgetAId);
- if (pWA == NULL) {
+ if (pWA == 0) {
DEBUG(DBG_SRC) << "role A object " << Uml::ID::toString(m_widgetAId) << " not found";
return false;
}
m_pOw[Uml::RoleType::A] = pWA->asObjectWidget();
- if (m_pOw[Uml::RoleType::A] == NULL) {
+ if (m_pOw[Uml::RoleType::A] == 0) {
DEBUG(DBG_SRC) << "role A widget " << Uml::ID::toString(m_widgetAId)
<< " is not an ObjectWidget";
return false;
}
}
- if (m_pOw[Uml::RoleType::B] == NULL) {
+ if (m_pOw[Uml::RoleType::B] == 0) {
UMLWidget *pWB = m_scene->findWidget(m_widgetBId);
- if (pWB == NULL) {
+ if (pWB == 0) {
DEBUG(DBG_SRC) << "role B object " << Uml::ID::toString(m_widgetBId) << " not found";
return false;
}
m_pOw[Uml::RoleType::B] = pWB->asObjectWidget();
- if (m_pOw[Uml::RoleType::B] == NULL) {
+ if (m_pOw[Uml::RoleType::B] == 0) {
DEBUG(DBG_SRC) << "role B widget " << Uml::ID::toString(m_widgetBId)
<< " is not an ObjectWidget";
return false;
@@ -813,7 +813,7 @@ bool MessageWidget::activate(IDChangeLog * /*Log = 0*/)
updateResizability();
UMLClassifier *c = m_pOw[Uml::RoleType::B]->umlObject()->asUMLClassifier();
- UMLOperation *op = NULL;
+ UMLOperation *op = 0;
if (c && !m_CustomOp.isEmpty()) {
Uml::ID::Type opId = Uml::ID::fromString(m_CustomOp);
op = c->findChildObjectById(opId, true)->asUMLOperation();
@@ -876,7 +876,7 @@ void MessageWidget::resolveObjectWidget(IDChangeLog* log) {
*/
void MessageWidget::setMessageText(FloatingTextWidget *ft)
{
- if (ft == NULL)
+ if (ft == 0)
return;
ft->setSequenceNumber(m_SequenceNumber);
ft->setText(operationText(m_scene));
@@ -924,8 +924,8 @@ void MessageWidget::lwSetFont (QFont font)
UMLClassifier *MessageWidget::operationOwner()
{
UMLObject *pObject = m_pOw[Uml::RoleType::B]->umlObject();
- if (pObject == NULL)
- return NULL;
+ if (pObject == 0)
+ return 0;
UMLClassifier *c = pObject->asUMLClassifier();
return c;
}
@@ -980,7 +980,7 @@ void MessageWidget::setCustomOpText(const QString &opText)
QString MessageWidget::lwOperationText()
{
UMLOperation *pOperation = operation();
- if (pOperation != NULL) {
+ if (pOperation != 0) {
return pOperation->toString(Uml::SignatureType::SigNoVis);
} else {
return customOpText();
@@ -1192,7 +1192,7 @@ void MessageWidget::cleanup()
UMLWidget::cleanup();
if (m_pFText) {
m_scene->removeWidgetCmd(m_pFText);
- m_pFText = NULL;
+ m_pFText = 0;
}
}
@@ -1321,7 +1321,7 @@ void MessageWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
Q_UNUSED(event)
DEBUG(DBG_SRC) << "NOT IMPLEMENTED YET!";
- if (m_pFText != NULL) {
+ if (m_pFText != 0) {
DEBUG(DBG_SRC) << "NOT IMPLEMENTED YET - on floating text widget!";
// QAction* action = m_pMenu->getAction(ListPopupMenu::mt_Select_Operation);
// m_pFText->slotMenuSelection(action);
@@ -1401,7 +1401,7 @@ bool MessageWidget::loadFromXMI(QDomElement& qElement)
if(! m_pFText->loadFromXMI(element)) {
// Most likely cause: The FloatingTextWidget is empty.
delete m_pFText;
- m_pFText = NULL;
+ m_pFText = 0;
}
else
m_pFText->setSequenceNumber(m_SequenceNumber);
diff --git a/umbrello/umlwidgets/nodewidget.cpp b/umbrello/umlwidgets/nodewidget.cpp
index 8b10584..8a6c1e7 100644
--- a/umbrello/umlwidgets/nodewidget.cpp
+++ b/umbrello/umlwidgets/nodewidget.cpp
@@ -115,7 +115,7 @@ void NodeWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option
*/
QSizeF NodeWidget::minimumSize() const
{
- if (m_umlObject == NULL) {
+ if (m_umlObject == 0) {
DEBUG(DBG_SRC) << "m_umlObject is NULL";
return UMLWidget::minimumSize();
}
diff --git a/umbrello/umlwidgets/notewidget.cpp b/umbrello/umlwidgets/notewidget.cpp
index 88c33ad..2eb6ee5 100644
--- a/umbrello/umlwidgets/notewidget.cpp
+++ b/umbrello/umlwidgets/notewidget.cpp
@@ -172,7 +172,7 @@ void NoteWidget::setDiagramLink(Uml::ID::Type viewID)
{
UMLDoc *umldoc = UMLApp::app()->document();
UMLView *view = umldoc->findView(viewID);
- if (view == NULL) {
+ if (view == 0) {
uError() << "no view found for viewID " << Uml::ID::toString(viewID);
return;
}
diff --git a/umbrello/umlwidgets/objectnodewidget.cpp b/umbrello/umlwidgets/objectnodewidget.cpp
index 56455f0..b7ec07b 100644
--- a/umbrello/umlwidgets/objectnodewidget.cpp
+++ b/umbrello/umlwidgets/objectnodewidget.cpp
@@ -342,7 +342,7 @@ void ObjectNodeWidget::askForObjectNodeType(UMLWidget* &targetWidget)
} else {
targetWidget->cleanup();
delete targetWidget;
- targetWidget = NULL;
+ targetWidget = 0;
}
}
diff --git a/umbrello/umlwidgets/packagewidget.cpp b/umbrello/umlwidgets/packagewidget.cpp
index b33a4f3..203c8ef 100644
--- a/umbrello/umlwidgets/packagewidget.cpp
+++ b/umbrello/umlwidgets/packagewidget.cpp
@@ -74,7 +74,7 @@ void PackageWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt
const int fontHeight = fm.lineSpacing();
painter->drawRect(0, 0, 50, fontHeight);
- if (m_umlObject != NULL
+ if (m_umlObject != 0
&& m_umlObject->stereotype() == QLatin1String("subsystem")) {
const int fHalf = fontHeight / 2;
@@ -91,7 +91,7 @@ void PackageWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt
painter->setFont(font);
int lines = 1;
- if (m_umlObject != NULL) {
+ if (m_umlObject != 0) {
QString stereotype = m_umlObject->stereotype();
if (!stereotype.isEmpty()) {
painter->drawText(0, fontHeight + PACKAGE_MARGIN,
diff --git a/umbrello/umlwidgets/pinportbase.cpp b/umbrello/umlwidgets/pinportbase.cpp
index c503f78..cb32b8d 100644
--- a/umbrello/umlwidgets/pinportbase.cpp
+++ b/umbrello/umlwidgets/pinportbase.cpp
@@ -55,7 +55,7 @@ void PinPortBase::init(UMLWidget *owner)
m_ignoreSnapComponentSizeToGrid = true;
m_resizable = false;
m_pOw = owner;
- m_pName = NULL;
+ m_pName = 0;
m_motionConnected = false;
const int edgeLength = 15; // old: (m_baseType == wt_Pin ? 10 : 15);
const QSizeF FixedSize(edgeLength, edgeLength);
@@ -114,7 +114,7 @@ void PinPortBase::moveWidgetBy(qreal diffX, qreal diffY)
qreal newX = x() + diffX;
qreal newY = y() + diffY;
uDebug() << "PinPortBase::moveWidgetBy " << diffX << "," << diffY;
- if (owner == NULL) {
+ if (owner == 0) {
uError() << "PinPortBase::moveWidgetBy: ownerWidget() returns NULL";
setX(newX);
setY(newY);
@@ -155,7 +155,7 @@ void PinPortBase::moveWidgetBy(qreal diffX, qreal diffY)
void PinPortBase::attachToOwner() {
UMLWidget *owner = ownerWidget();
const QPointF scenePos = m_scene->pos();
- if (owner == NULL) {
+ if (owner == 0) {
uError() << "PinPortBase::attachToOwner: ownerWidget() returns NULL";
setX(scenePos.x());
setY(scenePos.y());
@@ -230,7 +230,7 @@ void PinPortBase::slotMenuSelection(QAction* action)
if (m_pName) {
action->setChecked(true);
delete m_pName;
- m_pName = NULL;
+ m_pName = 0;
setToolTip(name());
} else {
action->setChecked(false);
@@ -239,7 +239,7 @@ void PinPortBase::slotMenuSelection(QAction* action)
m_pName->setText(name()); // to get geometry update
m_pName->activate();
UMLWidget* owner = ownerWidget();
- if (owner == NULL) {
+ if (owner == 0) {
uError() << "PinPortBase::slotMenuSelection: ownerWidget() returns NULL";
setX(x());
setY(y());
@@ -285,19 +285,19 @@ void PinPortBase::setFloatingTextWidget(FloatingTextWidget *ft) {
*
* @param p Point to be checked.
*
- * @return 'this' if UMLWidget::onWidget(p) returns non NULL;
- * m_pName if m_pName is non NULL and m_pName->onWidget(p) returns non NULL;
+ * @return 'this' if UMLWidget::onWidget(p) returns non 0;
+ * m_pName if m_pName is non NULL and m_pName->onWidget(p) returns non 0;
* else NULL.
*/
UMLWidget* PinPortBase::onWidget(const QPointF &p)
{
- if (UMLWidget::onWidget(p) != NULL)
+ if (UMLWidget::onWidget(p) != 0)
return this;
if (m_pName) {
uDebug() << "floatingtext: " << m_pName->text();
return m_pName->onWidget(p);
}
- return NULL;
+ return 0;
}
/**
@@ -309,7 +309,7 @@ UMLWidget* PinPortBase::widgetWithID(Uml::ID::Type id)
return this;
if (m_pName && m_pName->widgetWithID(id))
return m_pName;
- return NULL;
+ return 0;
}
@@ -339,7 +339,7 @@ bool PinPortBase::loadFromXMI(QDomElement & qElement)
QString widgetaid = qElement.attribute(QLatin1String("widgetaid"), QLatin1String("-1"));
Uml::ID::Type aId = Uml::ID::fromString(widgetaid);
UMLWidget *owner = m_scene->findWidget(aId);
- if (owner == NULL) {
+ if (owner == 0) {
DEBUG(DBG_SRC) << "owner object " << Uml::ID::toString(aId) << " not found";
return false;
}
@@ -356,7 +356,7 @@ bool PinPortBase::loadFromXMI(QDomElement & qElement)
if (!m_pName->loadFromXMI(element)) {
// Most likely cause: The FloatingTextWidget is empty.
delete m_pName;
- m_pName = NULL;
+ m_pName = 0;
} else {
m_pName->setParentItem(this);
m_pName->activate();
diff --git a/umbrello/umlwidgets/portwidget.cpp b/umbrello/umlwidgets/portwidget.cpp
index 14513ff..0dc52ed 100644
--- a/umbrello/umlwidgets/portwidget.cpp
+++ b/umbrello/umlwidgets/portwidget.cpp
@@ -57,7 +57,7 @@ PortWidget::~PortWidget()
*/
UMLWidget* PortWidget::ownerWidget()
{
- if (m_pOw == NULL) {
+ if (m_pOw == 0) {
const Uml::ID::Type compWidgetId = m_umlObject->umlPackage()->id();
m_pOw = m_scene->widgetOnDiagram(compWidgetId);
}
diff --git a/umbrello/umlwidgets/signalwidget.cpp b/umbrello/umlwidgets/signalwidget.cpp
index 8a5d3e3..b7137ac 100644
--- a/umbrello/umlwidgets/signalwidget.cpp
+++ b/umbrello/umlwidgets/signalwidget.cpp
@@ -49,7 +49,7 @@ SignalWidget::SignalWidget(UMLScene *scene, SignalType signalType, Uml::ID::Type
m_oldY(0)
{
m_signalType = signalType;
- m_pName = NULL;
+ m_pName = 0;
if (signalType == SignalWidget::Time) {
m_pName = new FloatingTextWidget(scene, Uml::TextRole::Floating, QString());
scene->setupNewWidget(m_pName);
@@ -245,7 +245,7 @@ void SignalWidget::mouseMoveEvent(QGraphicsSceneMouseEvent* me)
UMLWidget::mouseMoveEvent(me);
int diffX = m_oldX - x();
int diffY = m_oldY - y();
- if (m_pName!=NULL) {
+ if (m_pName!=0) {
m_pName->setX(m_pName->x() - diffX);
m_pName->setY(m_pName->y() - diffY);
}
@@ -269,7 +269,7 @@ bool SignalWidget::loadFromXMI(QDomElement & qElement)
if (textId != Uml::ID::None) {
UMLWidget *flotext = m_scene -> findWidget(textId);
- if (flotext != NULL) {
+ if (flotext != 0) {
// This only happens when loading files produced by
// umbrello-1.3-beta2.
m_pName = static_cast<FloatingTextWidget*>(flotext);
@@ -290,7 +290,7 @@ bool SignalWidget::loadFromXMI(QDomElement & qElement)
if(! m_pName->loadFromXMI(element)) {
// Most likely cause: The FloatingTextWidget is empty.
delete m_pName;
- m_pName = NULL;
+ m_pName = 0;
}
else
connect(m_pName, SIGNAL(destroyed()), this, SLOT(slotTextDestroyed()));
diff --git a/umbrello/umlwidgets/umlwidget.cpp b/umbrello/umlwidgets/umlwidget.cpp
index d51095e..a8070d2 100644
--- a/umbrello/umlwidgets/umlwidget.cpp
+++ b/umbrello/umlwidgets/umlwidget.cpp
@@ -218,10 +218,10 @@ Uml::ID::Type UMLWidget::localID() const
UMLWidget* UMLWidget::widgetWithID(Uml::ID::Type id)
{
if (id == m_nLocalID ||
- (m_umlObject != NULL && id == m_umlObject->id()) ||
+ (m_umlObject != 0 && id == m_umlObject->id()) ||
id == m_nId)
return this;
- return NULL;
+ return 0;
}
/**
@@ -981,9 +981,9 @@ void UMLWidget::setFillColorCmd(const QColor &color)
*/
bool UMLWidget::activate(IDChangeLog* /*ChangeLog = 0 */)
{
- if (widgetHasUMLObject(m_baseType) && m_umlObject == NULL) {
+ if (widgetHasUMLObject(m_baseType) && m_umlObject == 0) {
m_umlObject = m_doc->findObjectById(m_nId);
- if (m_umlObject == NULL) {
+ if (m_umlObject == 0) {
uError() << "cannot find UMLObject with id=" << Uml::ID::toString(m_nId);
return false;
}
diff --git a/umbrello/umlwidgets/widget_factory.cpp b/umbrello/umlwidgets/widget_factory.cpp
index b58d33d..a5119fd 100644
--- a/umbrello/umlwidgets/widget_factory.cpp
+++ b/umbrello/umlwidgets/widget_factory.cpp
@@ -71,7 +71,7 @@ UMLWidget *createWidget(UMLScene *scene, UMLObject *o)
int y = pos.y();
Uml::DiagramType::Enum diagramType = scene->type();
UMLObject::ObjectType type = o->baseType();
- UMLWidget *newWidget = NULL;
+ UMLWidget *newWidget = 0;
switch (type) {
case UMLObject::ot_Actor:
if (diagramType == Uml::DiagramType::Sequence) {
@@ -168,12 +168,12 @@ UMLWidget *createWidget(UMLScene *scene, UMLObject *o)
bool validateObjType(UMLObject::ObjectType expected, UMLObject* &o, Uml::ID::Type id)
{
- if (o == NULL) {
+ if (o == 0) {
uDebug() << "Widget_Factory::validateObjType: creating new object of type "
<< expected;
QString artificialName = QLatin1String("LOST_") + Uml::ID::toString(id);
- o = Object_Factory::createUMLObject(expected, artificialName, NULL, false);
- if (o == NULL)
+ o = Object_Factory::createUMLObject(expected, artificialName, 0, false);
+ if (o == 0)
return false;
o->setID(id);
UMLPackage *parentPkg = o->umlPackage();
@@ -195,7 +195,7 @@ bool validateObjType(UMLObject::ObjectType expected, UMLObject* &o, Uml::ID::Typ
UMLWidget* makeWidgetFromXMI(const QString& tag,
const QString& idStr, UMLScene *scene)
{
- UMLWidget *widget = NULL;
+ UMLWidget *widget = 0;
// Loading of widgets which do NOT represent any UMLObject,
// just graphic stuff with no real model information
@@ -216,7 +216,7 @@ UMLWidget* makeWidgetFromXMI(const QString& tag,
} else if (tag == QLatin1String("forkjoin")) {
widget = new ForkJoinWidget(scene, Qt::Vertical, Uml::ID::Reserved);
} else if (tag == QLatin1String("preconditionwidget")) {
- widget = new PreconditionWidget(scene, NULL, Uml::ID::Reserved);
+ widget = new PreconditionWidget(scene, 0, Uml::ID::Reserved);
} else if (tag == QLatin1String("combinedFragmentwidget")) {
widget = new CombinedFragmentWidget(scene, CombinedFragmentWidget::Ref, Uml::ID::Reserved);
} else if (tag == QLatin1String("signalwidget")) {
@@ -228,7 +228,7 @@ UMLWidget* makeWidgetFromXMI(const QString& tag,
} else if (tag == QLatin1String("regionwidget")) {
widget = new RegionWidget(scene, Uml::ID::Reserved);
} else if (tag == QLatin1String("pinwidget")) {
- PinPortBase *pw = new PinWidget(scene, NULL, Uml::ID::Reserved);
+ PinPortBase *pw = new PinWidget(scene, 0, Uml::ID::Reserved);
pw->attachToOwner();
widget = pw;
}
@@ -240,7 +240,7 @@ UMLWidget* makeWidgetFromXMI(const QString& tag,
Uml::ID::Type id = Uml::ID::fromString(idStr);
UMLDoc *umldoc = UMLApp::app()->document();
UMLObject *o = umldoc->findObjectById(id);
- if (o == NULL) {
+ if (o == 0) {
uDebug() << "makeWidgetFromXMI: cannot find object with id "
<< Uml::ID::toString(id);
}
diff --git a/umbrello/umlwidgets/widget_utils.cpp b/umbrello/umlwidgets/widget_utils.cpp
index f0d6292..18a6e16 100644
--- a/umbrello/umlwidgets/widget_utils.cpp
+++ b/umbrello/umlwidgets/widget_utils.cpp
@@ -57,7 +57,7 @@ namespace Widget_Utils
return obj;
}
}
- return NULL;
+ return 0;
}
/**
diff --git a/umbrello/umlwidgets/widgetbase.cpp b/umbrello/umlwidgets/widgetbase.cpp
index a16e247..0561a10 100644
--- a/umbrello/umlwidgets/widgetbase.cpp
+++ b/umbrello/umlwidgets/widgetbase.cpp
@@ -533,7 +533,7 @@ bool WidgetBase::loadFromXMI(QDomElement& qElement)
if (lineColor != QLatin1String("none")) {
setLineColor(QColor(lineColor));
m_usesDiagramLineColor = false;
- } else if (m_baseType != WidgetBase::wt_Box && m_scene != NULL) {
+ } else if (m_baseType != WidgetBase::wt_Box && m_scene != 0) {
setLineColor(m_scene->lineColor());
m_usesDiagramLineColor = true;
}
@@ -664,8 +664,8 @@ QRectF WidgetBase::boundingRect() const
UMLWidget* WidgetBase::onWidget(const QPointF &p)
{
UMLWidget *uw = this->asUMLWidget();
- if (uw == NULL)
- return NULL;
+ if (uw == 0)
+ return 0;
const qreal w = m_rect.width();
const qreal h = m_rect.height();
const qreal left = x(); // don't use m_rect.x() for this, it is always 0
@@ -678,7 +678,7 @@ UMLWidget* WidgetBase::onWidget(const QPointF &p)
if (p.x() < left || p.x() > right ||
p.y() < top || p.y() > bottom) { // Qt coord.sys. origin in top left corner
// uDebug() << "returning NULL";
- return NULL;
+ return 0;
}
// uDebug() << "returning this";
return uw;
diff --git a/umbrello/worktoolbar.cpp b/umbrello/worktoolbar.cpp
index 5e0a563..569c370 100644
--- a/umbrello/worktoolbar.cpp
+++ b/umbrello/worktoolbar.cpp
@@ -272,7 +272,7 @@ void WorkToolBar::slotResetToolBar()
emit sigButtonChanged(m_CurrentButtonID);
UMLView* view = UMLApp::app()->currentView();
- if (view != NULL) {
+ if (view != 0) {
view->setCursor(defaultCursor());
}
}