Fem: use WeakPtrT classes instead of raw pointers to avoid possible dangling pointers and to avoid undefined behaviour if a wrong static_cast is performed
This commit is contained in:
@@ -212,7 +212,8 @@ ViewProviderDataMarker::~ViewProviderDataMarker()
|
||||
// ***************************************************************************
|
||||
|
||||
TaskDlgPost::TaskDlgPost(Gui::ViewProviderDocumentObject* view)
|
||||
: TaskDialog(), m_view(view)
|
||||
: TaskDialog()
|
||||
, m_view(view)
|
||||
{
|
||||
assert(view);
|
||||
}
|
||||
@@ -289,10 +290,10 @@ void TaskDlgPost::modifyStandardButtons(QDialogButtonBox* box) {
|
||||
// ***************************************************************************
|
||||
// some task box methods
|
||||
TaskPostBox::TaskPostBox(Gui::ViewProviderDocumentObject* view, const QPixmap& icon, const QString& title, QWidget* parent)
|
||||
: TaskBox(icon, title, true, parent) {
|
||||
|
||||
m_view = view;
|
||||
m_object = view->getObject();
|
||||
: TaskBox(icon, title, true, parent)
|
||||
, m_object(view->getObject())
|
||||
, m_view(view)
|
||||
{
|
||||
}
|
||||
|
||||
TaskPostBox::~TaskPostBox() {
|
||||
|
||||
Reference in New Issue
Block a user