[Uml-devel] branches/work/soc-umbrello (silent)
Gopala Krishna A
krishna.ggk at gmail.com
Sat Jun 27 18:11:40 UTC 2009
SVN commit 988299 by gopala:
SVN_SILENT: Manual merge but marked as "only recorded".
Recorded merge of revisions 973159 via svnmerge from
svn+ssh://svn.kde.org/home/kde/trunk/KDE/kdesdk/umbrello
........
r973159 | fischer | 2009-05-26 19:32:49 +0530 (Tue, 26 May 2009) | 1 line
Some Krazy complaints about crashy code (check 5) and a crash when right clicking on a association fixed.
........
_M . (directory)
M +3 -2 umbrello/widgets/activitywidget.cpp
M +33 -29 umbrello/widgets/associationwidget.cpp
M +36 -37 umbrello/widgets/floatingtextwidget.cpp
M +4 -2 umbrello/widgets/objectnodewidget.cpp
M +4 -2 umbrello/widgets/objectwidget.cpp
M +4 -2 umbrello/widgets/umlwidget.cpp
** branches/work/soc-umbrello #property svnmerge-integrated
- /trunk/KDE/kdesdk/umbrello:1-854015,854687,854787,855207-866962,866965-870129,871091,872169-887978,889968-889981,890075-890805,896752-896872,901256-910119,911086,911706-911805,912902,913652,914852-917492,918579-919414,920540-921357,922431,922854-927155,928929-928936,931178-937536,937636,937969-941130,941971,942048-942637,943412,945536-946356,948572-948599,949430,951335-951484,952053-952131,952436-953088,956010-956619,957386,958937,961888,962900,963206-963898,964692,971486,972572-972879
+ /trunk/KDE/kdesdk/umbrello:1-854015,854687,854787,855207-866962,866965-870129,871091,872169-887978,889968-889981,890075-890805,896752-896872,901256-910119,911086,911706-911805,912902,913652,914852-917492,918579-919414,920540-921357,922431,922854-927155,928929-928936,931178-937536,937636,937969-941130,941971,942048-942637,943412,945536-946356,948572-948599,949430,951335-951484,952053-952131,952436-953088,956010-956619,957386,958937,961888,962900,963206-963898,964692,971486,972572-972879,973159
--- branches/work/soc-umbrello/umbrello/widgets/activitywidget.cpp #988298:988299
@@ -82,11 +82,12 @@
DocWindow *docwindow = UMLApp::app()->getDocWindow();
docwindow->updateDocumentation(false);
- ActivityDialog dialog(umlScene()->activeView(), this);
- if (dialog.exec() && dialog.getChangesMade()) {
+ QPointer<ActivityDialog> dialog = new ActivityDialog(umlScene()->activeView(), this);
+ if (dialog->exec() && dialog->getChangesMade()) {
docwindow->showDocumentation(this, true);
UMLApp::app()->getDocument()->setModified(true);
}
+ delete dialog;
}
void ActivityWidget::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
--- branches/work/soc-umbrello/umbrello/widgets/associationwidget.cpp #988298:988299
@@ -16,10 +16,11 @@
#include <cmath>
// qt includes
-#include <QRegExpValidator>
-#include <QGraphicsSceneMouseEvent>
-#include <QMoveEvent>
-#include <QApplication>
+#include <QtCore/QPointer>
+#include <QtGui/QRegExpValidator>
+#include <QtGui/QGraphicsSceneMouseEvent>
+#include <QtGui/QMoveEvent>
+#include <QtGui/QApplication>
// kde includes
#include <kdebug.h>
@@ -2671,31 +2672,34 @@
*/
bool AssociationWidget::showDialog()
{
- AssocPropDlg dlg(static_cast<QWidget*>(umlScene()->activeView()), this );
- if (! dlg.exec())
- return false;
- QString name = getName();
- QString doc = documentation();
- QString roleADoc = getRoleDoc(A), roleBDoc = getRoleDoc(B);
- QString rnA = getRoleName(A), rnB = getRoleName(B);
- QString ma = getMulti(A), mb = getMulti(B);
- Uml::Visibility vA = getVisibility(A), vB = getVisibility(B);
- Uml::Changeability_Type cA = getChangeability(A), cB = getChangeability(B);
- //rules built into these functions to stop updating incorrect values
- setName(name);
- setRoleName(rnA, A);
- setRoleName(rnB, B);
- setDocumentation(doc);
- setRoleDoc(roleADoc, A);
- setRoleDoc(roleBDoc, B);
- setMulti(ma, A);
- setMulti(mb, B);
- setVisibility(vA, A);
- setVisibility(vB, B);
- setChangeability(cA, A);
- setChangeability(cB, B);
- umlScene()->showDocumentation( this, true );
- return true;
+ bool success = false;
+ QPointer<AssocPropDlg> dlg = new AssocPropDlg(static_cast<QWidget*>(umlScene()->activeView()), this );
+ if (dlg->exec()) {
+ success = true;
+ QString name = getName();
+ QString doc = documentation();
+ QString roleADoc = getRoleDoc(A), roleBDoc = getRoleDoc(B);
+ QString rnA = getRoleName(A), rnB = getRoleName(B);
+ QString ma = getMulti(A), mb = getMulti(B);
+ Uml::Visibility vA = getVisibility(A), vB = getVisibility(B);
+ Uml::Changeability_Type cA = getChangeability(A), cB = getChangeability(B);
+ //rules built into these functions to stop updating incorrect values
+ setName(name);
+ setRoleName(rnA, A);
+ setRoleName(rnB, B);
+ setDocumentation(doc);
+ setRoleDoc(roleADoc, A);
+ setRoleDoc(roleBDoc, B);
+ setMulti(ma, A);
+ setMulti(mb, B);
+ setVisibility(vA, A);
+ setVisibility(vB, B);
+ setChangeability(cA, A);
+ setChangeability(cB, B);
+ umlScene()->showDocumentation( this, true );
+ }
+ delete dlg;
+ return success;
}
/**
--- branches/work/soc-umbrello/umbrello/widgets/floatingtextwidget.cpp #988298:988299
@@ -34,6 +34,7 @@
#include <klocale.h>
// qt includes
+#include <QtCore/QPointer>
#include <QtCore/QRegExp>
#include <QtGui/QValidator>
@@ -179,52 +180,50 @@
return;
}
- SelectOpDlg selectDlg(umlScene()->activeView(), c);
- selectDlg.setSeqNumber( seqNum );
+ QPointer<SelectOpDlg> selectDlg = new SelectOpDlg(umlScene()->activeView(), c);
+ selectDlg->setSeqNumber( seqNum );
if (m_linkWidget->getOperation() == 0) {
- selectDlg.setCustomOp( opText );
+ selectDlg->setCustomOp( opText );
} else {
- selectDlg.setClassOp( opText );
+ selectDlg->setClassOp( opText );
}
- int result = selectDlg.exec();
- if (!result) {
- return;
- }
-
- seqNum = selectDlg.getSeqNumber();
- opText = selectDlg.getOpText();
- if (selectDlg.isClassOp()) {
- Model_Utils::OpDescriptor od;
- Model_Utils::Parse_Status st = Model_Utils::parseOperation(opText, od, c);
- if (st == Model_Utils::PS_OK) {
- UMLClassifierList selfAndAncestors = c->findSuperClassConcepts();
- selfAndAncestors.prepend(c);
- UMLOperation *op = 0;
- foreach (UMLClassifier *cl , selfAndAncestors) {
- op = cl->findOperation(od.m_name, od.m_args);
- if (op) {
- break;
+ if (selectDlg->exec()) {
+ seqNum = selectDlg->getSeqNumber();
+ opText = selectDlg->getOpText();
+ if (selectDlg->isClassOp()) {
+ Model_Utils::OpDescriptor od;
+ Model_Utils::Parse_Status st = Model_Utils::parseOperation(opText, od, c);
+ if (st == Model_Utils::PS_OK) {
+ UMLClassifierList selfAndAncestors = c->findSuperClassConcepts();
+ selfAndAncestors.prepend(c);
+ UMLOperation *op = 0;
+ foreach (UMLClassifier *cl , selfAndAncestors) {
+ op = cl->findOperation(od.m_name, od.m_args);
+ if (op) {
+ break;
+ }
}
- }
- if (!op) {
- // The op does not yet exist. Create a new one.
- UMLObject *o = c->createOperation(od.m_name, 0, &od.m_args);
- op = static_cast<UMLOperation*>(o);
- }
- if (od.m_pReturnType) {
- op->setType(od.m_pReturnType);
- }
+ if (!op) {
+ // The op does not yet exist. Create a new one.
+ UMLObject *o = c->createOperation(od.m_name, 0, &od.m_args);
+ op = static_cast<UMLOperation*>(o);
+ }
+ if (od.m_pReturnType) {
+ op->setType(od.m_pReturnType);
+ }
- m_linkWidget->setOperation(op);
- opText = QString();
+ m_linkWidget->setOperation(op);
+ opText = QString();
+ } else {
+ m_linkWidget->setOperation(0);
+ }
} else {
m_linkWidget->setOperation(0);
}
- } else {
- m_linkWidget->setOperation(0);
+ m_linkWidget->setSeqNumAndOp(seqNum, opText);
+ setMessageText();
}
- m_linkWidget->setSeqNumAndOp(seqNum, opText);
- setMessageText();
+ delete selectDlg;
}
/**
--- branches/work/soc-umbrello/umbrello/widgets/objectnodewidget.cpp #988298:988299
@@ -28,6 +28,7 @@
#include <kinputdialog.h>
// qt includes
+#include <QtCore/QPointer>
#include <QtGui/QPainter>
const QSizeF ObjectNodeWidget::MinimumSize(30, 10);
@@ -95,11 +96,12 @@
DocWindow *docwindow = UMLApp::app()->getDocWindow();
docwindow->updateDocumentation(false);
- ObjectNodeDialog dialog(umlScene()->activeView(), this);
- if (dialog.exec() && dialog.getChangesMade()) {
+ QPointer<ObjectNodeDialog> dialog = new ObjectNodeDialog(umlScene()->activeView(), this);
+ if (dialog->exec() && dialog->getChangesMade()) {
docwindow->showDocumentation(this, true);
UMLApp::app()->getDocument()->setModified(true);
}
+ delete dialog;
}
/**
--- branches/work/soc-umbrello/umbrello/widgets/objectwidget.cpp #988298:988299
@@ -30,6 +30,7 @@
#include <kinputdialog.h>
// qt includes
+#include <QtCore/QPointer>
#include <QtGui/QValidator>
/// Size used for drawing Actor
@@ -329,11 +330,12 @@
DocWindow *docwindow = UMLApp::app()->getDocWindow();
docwindow->updateDocumentation(false);
- ClassPropDlg dlg((QWidget*)UMLApp::app(), this);
- if (dlg.exec()) {
+ QPointer<ClassPropDlg> dlg = new ClassPropDlg((QWidget*)UMLApp::app(), this);
+ if (dlg->exec()) {
docwindow->showDocumentation(this, true);
UMLApp::app()->getDocument()->setModified(true);
}
+ delete dlg;
}
/**
--- branches/work/soc-umbrello/umbrello/widgets/umlwidget.cpp #988298:988299
@@ -33,6 +33,7 @@
#include "widgethandle.h"
#include "widget_utils.h"
+#include <QtCore/QPointer>
#include <QtGui/QDialog>
#include <QtGui/QGraphicsSceneHoverEvent>
@@ -211,13 +212,14 @@
// back it the widget
DocWindow *docwindow = UMLApp::app()->getDocWindow();
docwindow->updateDocumentation(false);
- ClassPropDlg *dlg = new ClassPropDlg((QWidget*)UMLApp::app(), this);
+ QPointer<ClassPropDlg> dlg = new ClassPropDlg((QWidget*)UMLApp::app(), this);
if (dlg->exec()) {
docwindow->showDocumentation(umlObject() , true);
umlDoc()->setModified(true);
}
- dlg->close(); //wipe from memory
+ dlg->close();
+ delete dlg;
}
void UMLWidget::setupContextMenuActions(ListPopupMenu &menu)
More information about the umbrello-devel
mailing list