From 0c42eb06b2c145bd33f4e9c8dae03346da4d0287 Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 15 Jul 2014 17:28:19 +0300 Subject: [PATCH] Fix crash. Redefine updating list of variables. --HG-- branch : develop --- src/app/dialogs/tools/dialogdetail.cpp | 10 ++++++++++ src/app/dialogs/tools/dialogdetail.h | 3 ++- src/app/dialogs/tools/dialogheight.cpp | 9 +++++++++ src/app/dialogs/tools/dialogheight.h | 1 + src/app/dialogs/tools/dialogline.cpp | 9 +++++++++ src/app/dialogs/tools/dialogline.h | 1 + src/app/dialogs/tools/dialoglineintersect.cpp | 9 +++++++++ src/app/dialogs/tools/dialoglineintersect.h | 1 + src/app/dialogs/tools/dialogpointofintersection.cpp | 9 +++++++++ src/app/dialogs/tools/dialogpointofintersection.h | 1 + src/app/dialogs/tools/dialogsinglepoint.cpp | 9 +++++++++ src/app/dialogs/tools/dialogsinglepoint.h | 3 ++- src/app/dialogs/tools/dialogspline.cpp | 9 +++++++++ src/app/dialogs/tools/dialogspline.h | 1 + src/app/dialogs/tools/dialogsplinepath.cpp | 9 +++++++++ src/app/dialogs/tools/dialogsplinepath.h | 1 + src/app/dialogs/tools/dialogtool.h | 2 +- src/app/dialogs/tools/dialoguniondetails.cpp | 9 +++++++++ src/app/dialogs/tools/dialoguniondetails.h | 3 ++- 19 files changed, 95 insertions(+), 4 deletions(-) diff --git a/src/app/dialogs/tools/dialogdetail.cpp b/src/app/dialogs/tools/dialogdetail.cpp index 6e90a1de2..2b49a603e 100644 --- a/src/app/dialogs/tools/dialogdetail.cpp +++ b/src/app/dialogs/tools/dialogdetail.cpp @@ -294,3 +294,13 @@ void DialogDetail::DeleteItem() qint32 row = ui.listWidget->currentRow(); delete ui.listWidget->item( row ); } + + +//--------------------------------------------------------------------------------------------------------------------- +void DialogDetail::UpdateList() +{ + /* + * Does nothing. We redefine this slot because it is only one now way block update list of variable. + * This dialog doesn't work with formula. Don't delete. Help avoid crash. + */ +} diff --git a/src/app/dialogs/tools/dialogdetail.h b/src/app/dialogs/tools/dialogdetail.h index ac35e7d15..086af98ab 100644 --- a/src/app/dialogs/tools/dialogdetail.h +++ b/src/app/dialogs/tools/dialogdetail.h @@ -50,13 +50,14 @@ public slots: /** TODO ISSUE 79 : create real function * @brief DialogApply apply data and emit signal about applied dialog. */ - virtual void DialogApply(){} + virtual void DialogApply(){} void BiasXChanged(qreal d); void BiasYChanged(qreal d); void ClickedSeams(bool checked); void ClickedClosed(bool checked); void ObjectChanged(int row); void DeleteItem(); + virtual void UpdateList(); private: /** @brief ui keeps information about user interface */ diff --git a/src/app/dialogs/tools/dialogheight.cpp b/src/app/dialogs/tools/dialogheight.cpp index 15a42cf9a..b0fce30d4 100644 --- a/src/app/dialogs/tools/dialogheight.cpp +++ b/src/app/dialogs/tools/dialogheight.cpp @@ -210,3 +210,12 @@ void DialogHeight::PointNameChanged() ChangeColor(ui->labelSecondLinePoint, color); CheckState(); } + +//--------------------------------------------------------------------------------------------------------------------- +void DialogHeight::UpdateList() +{ + /* + * Does nothing. We redefine this slot because it is only one now way block update list of variable. + * This dialog doesn't work with formula. Don't delete. Help avoid crash. + */ +} diff --git a/src/app/dialogs/tools/dialogheight.h b/src/app/dialogs/tools/dialogheight.h index 1a42b24b9..7f3ffbaa4 100644 --- a/src/app/dialogs/tools/dialogheight.h +++ b/src/app/dialogs/tools/dialogheight.h @@ -68,6 +68,7 @@ public slots: */ virtual void DialogApply(){} virtual void PointNameChanged(); + virtual void UpdateList(); private: Q_DISABLE_COPY(DialogHeight) diff --git a/src/app/dialogs/tools/dialogline.cpp b/src/app/dialogs/tools/dialogline.cpp index 98e7e1635..d314df17c 100644 --- a/src/app/dialogs/tools/dialogline.cpp +++ b/src/app/dialogs/tools/dialogline.cpp @@ -132,6 +132,15 @@ void DialogLine::PointNameChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogLine::UpdateList() +{ + /* + * Does nothing. We redefine this slot because it is only one now way block update list of variable. + * This dialog doesn't work with formula. Don't delete. Help avoid crash. + */ +} + //--------------------------------------------------------------------------------------------------------------------- void DialogLine::ShowVisualization() { diff --git a/src/app/dialogs/tools/dialogline.h b/src/app/dialogs/tools/dialogline.h index e88113c98..162238aa7 100644 --- a/src/app/dialogs/tools/dialogline.h +++ b/src/app/dialogs/tools/dialogline.h @@ -64,6 +64,7 @@ public slots: */ virtual void DialogApply(){} virtual void PointNameChanged(); + virtual void UpdateList(); protected: virtual void ShowVisualization(); private: diff --git a/src/app/dialogs/tools/dialoglineintersect.cpp b/src/app/dialogs/tools/dialoglineintersect.cpp index 71a763490..95464253c 100644 --- a/src/app/dialogs/tools/dialoglineintersect.cpp +++ b/src/app/dialogs/tools/dialoglineintersect.cpp @@ -254,6 +254,15 @@ void DialogLineIntersect::PointNameChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogLineIntersect::UpdateList() +{ + /* + * Does nothing. We redefine this slot because it is only one now way block update list of variable. + * This dialog doesn't work with formula. Don't delete. Help avoid crash. + */ +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief CheckState check state of dialog. Enable or disable button ok. diff --git a/src/app/dialogs/tools/dialoglineintersect.h b/src/app/dialogs/tools/dialoglineintersect.h index 518d9cca2..ab590d0f0 100644 --- a/src/app/dialogs/tools/dialoglineintersect.h +++ b/src/app/dialogs/tools/dialoglineintersect.h @@ -72,6 +72,7 @@ public slots: void P1Line2Changed( int index); void P2Line2Changed( int index); virtual void PointNameChanged(); + virtual void UpdateList(); private: Q_DISABLE_COPY(DialogLineIntersect) diff --git a/src/app/dialogs/tools/dialogpointofintersection.cpp b/src/app/dialogs/tools/dialogpointofintersection.cpp index eaf421563..73c04f2cf 100644 --- a/src/app/dialogs/tools/dialogpointofintersection.cpp +++ b/src/app/dialogs/tools/dialogpointofintersection.cpp @@ -147,6 +147,15 @@ void DialogPointOfIntersection::PointNameChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogPointOfIntersection::UpdateList() +{ + /* + * Does nothing. We redefine this slot because it is only one now way block update list of variable. + * This dialog doesn't work with formula. Don't delete. Help avoid crash. + */ +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief setFirstPointId set id of first point diff --git a/src/app/dialogs/tools/dialogpointofintersection.h b/src/app/dialogs/tools/dialogpointofintersection.h index e036e6bf2..777044385 100644 --- a/src/app/dialogs/tools/dialogpointofintersection.h +++ b/src/app/dialogs/tools/dialogpointofintersection.h @@ -62,6 +62,7 @@ public slots: */ virtual void DialogApply(){} virtual void PointNameChanged(); + virtual void UpdateList(); private: Q_DISABLE_COPY(DialogPointOfIntersection) diff --git a/src/app/dialogs/tools/dialogsinglepoint.cpp b/src/app/dialogs/tools/dialogsinglepoint.cpp index 596a8a17a..d40ca3192 100644 --- a/src/app/dialogs/tools/dialogsinglepoint.cpp +++ b/src/app/dialogs/tools/dialogsinglepoint.cpp @@ -81,6 +81,15 @@ void DialogSinglePoint::DialogAccepted() emit DialogClosed(QDialog::Accepted); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogSinglePoint::UpdateList() +{ + /* + * Does nothing. We redefine this slot because it is only one now way block update list of variable. + * This dialog doesn't work with formula. Don't delete. Help avoid crash. + */ +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief setData set name and point diff --git a/src/app/dialogs/tools/dialogsinglepoint.h b/src/app/dialogs/tools/dialogsinglepoint.h index 6ee4ff4fb..2ab0dfacb 100644 --- a/src/app/dialogs/tools/dialogsinglepoint.h +++ b/src/app/dialogs/tools/dialogsinglepoint.h @@ -54,7 +54,8 @@ public slots: /** TODO ISSUE 79 : create real function * @brief DialogApply apply data and emit signal about applied dialog. */ - virtual void DialogApply(){} + virtual void DialogApply(){} + virtual void UpdateList(); private: Q_DISABLE_COPY(DialogSinglePoint) diff --git a/src/app/dialogs/tools/dialogspline.cpp b/src/app/dialogs/tools/dialogspline.cpp index e88ff93f1..90656107a 100644 --- a/src/app/dialogs/tools/dialogspline.cpp +++ b/src/app/dialogs/tools/dialogspline.cpp @@ -156,6 +156,15 @@ void DialogSpline::PointNameChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogSpline::UpdateList() +{ + /* + * Does nothing. We redefine this slot because it is only one now way block update list of variable. + * This dialog doesn't work with formula. Don't delete. Help avoid crash. + */ +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief setKCurve set coefficient curve diff --git a/src/app/dialogs/tools/dialogspline.h b/src/app/dialogs/tools/dialogspline.h index 28c99ea09..447181872 100644 --- a/src/app/dialogs/tools/dialogspline.h +++ b/src/app/dialogs/tools/dialogspline.h @@ -74,6 +74,7 @@ public slots: */ virtual void DialogApply(){} virtual void PointNameChanged(); + virtual void UpdateList(); private: Q_DISABLE_COPY(DialogSpline) diff --git a/src/app/dialogs/tools/dialogsplinepath.cpp b/src/app/dialogs/tools/dialogsplinepath.cpp index 95e8980bc..4adf5a0e6 100644 --- a/src/app/dialogs/tools/dialogsplinepath.cpp +++ b/src/app/dialogs/tools/dialogsplinepath.cpp @@ -210,6 +210,15 @@ void DialogSplinePath::KAsm2Changed(qreal d) item->setData(Qt::UserRole, QVariant::fromValue(p)); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogSplinePath::UpdateList() +{ + /* + * Does nothing. We redefine this slot because it is only one now way block update list of variable. + * This dialog doesn't work with formula. Don't delete. Help avoid crash. + */ +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief NewItem add point to list diff --git a/src/app/dialogs/tools/dialogsplinepath.h b/src/app/dialogs/tools/dialogsplinepath.h index fce0dcdae..d0ec30141 100644 --- a/src/app/dialogs/tools/dialogsplinepath.h +++ b/src/app/dialogs/tools/dialogsplinepath.h @@ -62,6 +62,7 @@ public slots: void Angle2Changed( qreal index ); void KAsm1Changed(qreal d); void KAsm2Changed(qreal d); + virtual void UpdateList(); private: Q_DISABLE_COPY(DialogSplinePath) diff --git a/src/app/dialogs/tools/dialogtool.h b/src/app/dialogs/tools/dialogtool.h index 870cb734b..f9bc00f3d 100644 --- a/src/app/dialogs/tools/dialogtool.h +++ b/src/app/dialogs/tools/dialogtool.h @@ -106,7 +106,7 @@ public slots: void PutHere(); void PutVal(QListWidgetItem * item); virtual void ValChenged(int row); - void UpdateList(); + virtual void UpdateList(); virtual void PointNameChanged(){} protected: Q_DISABLE_COPY(DialogTool) diff --git a/src/app/dialogs/tools/dialoguniondetails.cpp b/src/app/dialogs/tools/dialoguniondetails.cpp index ed58d8b80..b9acd6065 100644 --- a/src/app/dialogs/tools/dialoguniondetails.cpp +++ b/src/app/dialogs/tools/dialoguniondetails.cpp @@ -78,6 +78,15 @@ void DialogUnionDetails::DialogAccepted() emit DialogClosed(QDialog::Accepted); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogUnionDetails::UpdateList() +{ + /* + * Does nothing. We redefine this slot because it is only one now way block update list of variable. + * This dialog doesn't work with formula. Don't delete. Help avoid crash. + */ +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief CheckObject check if detail contain this id diff --git a/src/app/dialogs/tools/dialoguniondetails.h b/src/app/dialogs/tools/dialoguniondetails.h index 6ef21a3a4..ca8f92cd8 100644 --- a/src/app/dialogs/tools/dialoguniondetails.h +++ b/src/app/dialogs/tools/dialoguniondetails.h @@ -56,7 +56,8 @@ public slots: /** TODO ISSUE 79 : create real function * @brief DialogApply apply data and emit signal about applied dialog. */ - virtual void DialogApply(){} + virtual void DialogApply(){} + virtual void UpdateList(); private: Q_DISABLE_COPY(DialogUnionDetails)