summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/object_factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'umbrello/umbrello/object_factory.cpp')
-rw-r--r--umbrello/umbrello/object_factory.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/umbrello/umbrello/object_factory.cpp b/umbrello/umbrello/object_factory.cpp
index a87ff2c3..cf49a1e1 100644
--- a/umbrello/umbrello/object_factory.cpp
+++ b/umbrello/umbrello/object_factory.cpp
@@ -60,10 +60,10 @@ bool assignUniqueIdOnCreation() {
}
UMLObject* createNewUMLObject(Uml::Object_Type type, const TQString &name,
- UMLPackage *tqparentPkg) {
- if (tqparentPkg == NULL) {
+ UMLPackage *parentPkg) {
+ if (parentPkg == NULL) {
kError() << "Object_Factory::createNewUMLObject(" << name
- << "): tqparentPkg is NULL" << endl;
+ << "): parentPkg is NULL" << endl;
return NULL;
}
UMLObject *o = NULL;
@@ -114,40 +114,40 @@ UMLObject* createNewUMLObject(Uml::Object_Type type, const TQString &name,
kWarning() << "createNewUMLObject error unknown type: " << type << endl;
return NULL;
}
- o->setUMLPackage(tqparentPkg);
+ o->setUMLPackage(parentPkg);
UMLDoc *doc = UMLApp::app()->getDocument();
- tqparentPkg->addObject(o);
+ parentPkg->addObject(o);
doc->signalUMLObjectCreated(o);
kapp->processEvents();
return o;
}
UMLObject* createUMLObject(Uml::Object_Type type, const TQString &n,
- UMLPackage *tqparentPkg /* = NULL */,
+ UMLPackage *parentPkg /* = NULL */,
bool solicitNewName /* = true */) {
UMLDoc *doc = UMLApp::app()->getDocument();
- if (tqparentPkg == NULL) {
+ if (parentPkg == NULL) {
if (type == Uml::ot_Datatype) {
- tqparentPkg = doc->getDatatypeFolder();
+ parentPkg = doc->getDatatypeFolder();
} else {
Uml::Model_Type mt = Model_Utils::convert_OT_MT(type);
kDebug() << "Object_Factory::createUMLObject(" << n << "): "
- << "tqparentPkg is not set, assuming Model_Type " << mt << endl;
- tqparentPkg = doc->getRootFolder(mt);
+ << "parentPkg is not set, assuming Model_Type " << mt << endl;
+ parentPkg = doc->getRootFolder(mt);
}
}
if (!n.isEmpty()) {
- UMLObject *o = doc->findUMLObject(n, type, tqparentPkg);
+ UMLObject *o = doc->findUMLObject(n, type, parentPkg);
if (o) {
if (!solicitNewName)
return o;
} else {
- o = createNewUMLObject(type, n, tqparentPkg);
+ o = createNewUMLObject(type, n, parentPkg);
return o;
}
}
bool ok = false;
- TQString name = Model_Utils::uniqObjectName(type, tqparentPkg, n);
+ TQString name = Model_Utils::uniqObjectName(type, parentPkg, n);
bool bValidNameEntered = false;
do {
name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), name, &ok, (TQWidget*)UMLApp::app());
@@ -165,14 +165,14 @@ UMLObject* createUMLObject(Uml::Object_Type type, const TQString &n,
i18n("Reserved Keyword"));
continue;
}
- if (! doc->isUnique(name, tqparentPkg)) {
+ if (! doc->isUnique(name, parentPkg)) {
KMessageBox::error(0, i18n("That name is already being used."),
i18n("Not a Unique Name"));
continue;
}
bValidNameEntered = true;
} while (bValidNameEntered == false);
- UMLObject *o = createNewUMLObject(type, name, tqparentPkg);
+ UMLObject *o = createNewUMLObject(type, name, parentPkg);
return o;
}