Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Telemetry
KUserFeedback
Commits
0e44e8bf
Commit
0e44e8bf
authored
Feb 18, 2017
by
Volker Krause
Browse files
Don't leak item editor factory
parent
124a3449
Changes
4
Hide whitespace changes
Inline
Side-by-side
analyzer/schemaeditor/aggregationeditwidget.cpp
View file @
0e44e8bf
...
...
@@ -35,7 +35,7 @@ AggregationEditWidget::AggregationEditWidget(QWidget* parent) :
ui
->
setupUi
(
this
);
ui
->
aggregationView
->
setModel
(
m_model
);
qobject_cast
<
QStyledItemDelegate
*>
(
ui
->
aggregationView
->
itemDelegate
())
->
setItemEditorFactory
(
m_editorFactory
);
qobject_cast
<
QStyledItemDelegate
*>
(
ui
->
aggregationView
->
itemDelegate
())
->
setItemEditorFactory
(
m_editorFactory
.
get
()
);
connect
(
ui
->
actionAddAggregation
,
&
QAction
::
triggered
,
this
,
&
AggregationEditWidget
::
addAggregation
);
connect
(
ui
->
actionDeleteAggregation
,
&
QAction
::
triggered
,
this
,
&
AggregationEditWidget
::
deleteAggregation
);
...
...
analyzer/schemaeditor/aggregationeditwidget.h
View file @
0e44e8bf
...
...
@@ -52,7 +52,7 @@ private:
std
::
unique_ptr
<
Ui
::
AggregationEditWidget
>
ui
;
AggregationEditorModel
*
m_model
;
SchemaEntryItemEditorFactory
*
m_editorFactory
;
std
::
unique_ptr
<
SchemaEntryItemEditorFactory
>
m_editorFactory
;
};
}
}
...
...
analyzer/schemaeditor/schemaentryitemeditorfactory.cpp
View file @
0e44e8bf
...
...
@@ -83,6 +83,8 @@ SchemaEntryItemEditorFactory::SchemaEntryItemEditorFactory() :
registerEditor
(
qMetaTypeId
<
AggregationElement
>
(),
new
AggregationElementEditorCreator
(
m_elementModel
.
get
()));
}
SchemaEntryItemEditorFactory
::~
SchemaEntryItemEditorFactory
()
=
default
;
void
SchemaEntryItemEditorFactory
::
setProduct
(
const
Product
&
product
)
{
m_elementModel
->
setProduct
(
product
);
...
...
analyzer/schemaeditor/schemaentryitemeditorfactory.h
View file @
0e44e8bf
...
...
@@ -32,6 +32,7 @@ class SchemaEntryItemEditorFactory : public QItemEditorFactory
{
public:
SchemaEntryItemEditorFactory
();
~
SchemaEntryItemEditorFactory
();
void
setProduct
(
const
Product
&
product
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment