AppFwk: Fix crash and memory leak in TreeSelectionEditor system

This commit is contained in:
Jacob Støren 2017-11-15 10:42:06 +01:00
parent 07264140cb
commit f1c8c0ebbe
2 changed files with 4 additions and 4 deletions

View File

@ -158,9 +158,9 @@ void PdmUiTreeSelectionEditor::configureAndUpdateUi(const QString& uiConfigName)
if (!m_model)
{
m_model = new caf::PdmUiTreeSelectionQModel(m_treeView);
m_model = new caf::PdmUiTreeSelectionQModel(this);
m_proxyModel = new FilterLeafNodesOnlyProxyModel;
m_proxyModel = new FilterLeafNodesOnlyProxyModel(this);
m_proxyModel->setSourceModel(m_model);
m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);

View File

@ -95,8 +95,8 @@ private:
void recursiveNotifyChildren(const QModelIndex& index);
private:
QList<caf::PdmOptionItemInfo> m_options;
caf::PdmUiFieldEditorHandle* m_uiFieldHandle;
QList<caf::PdmOptionItemInfo> m_options;
QPointer<caf::PdmUiFieldEditorHandle> m_uiFieldHandle;
const QVariant* m_uiValueCache;