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
Tobias Hunger
qt-creator
Commits
2ffc045b
Commit
2ffc045b
authored
Oct 28, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.formEditor: fixes memory leak
Also fixes the memory leak in resize code. cleanup Reviewed-by: Marco Bubke
parent
b6bf93a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/formeditor/movemanipulator.cpp
View file @
2ffc045b
...
...
@@ -198,8 +198,6 @@ QPointF MoveManipulator::findSnappingOffset(const QHash<FormEditorItem*, QRectF>
void
MoveManipulator
::
generateSnappingLines
(
const
QHash
<
FormEditorItem
*
,
QRectF
>
&
boundingRectHash
)
{
qDeleteAll
(
m_graphicsLineList
);
m_graphicsLineList
.
clear
();
m_graphicsLineList
=
m_snapper
.
generateSnappingLines
(
boundingRectHash
.
values
(),
m_layerItem
.
data
(),
m_snapper
.
transformtionSpaceFormEditorItem
()
->
sceneTransform
());
...
...
@@ -417,8 +415,10 @@ void MoveManipulator::setOpacityForAllElements(qreal opacity)
void
MoveManipulator
::
deleteSnapLines
()
{
if
(
m_layerItem
)
{
foreach
(
QGraphicsItem
*
item
,
m_graphicsLineList
)
foreach
(
QGraphicsItem
*
item
,
m_graphicsLineList
)
{
m_layerItem
->
scene
()
->
removeItem
(
item
);
delete
item
;
}
}
m_graphicsLineList
.
clear
();
m_view
->
scene
()
->
update
();
...
...
src/plugins/qmldesigner/components/formeditor/resizemanipulator.cpp
View file @
2ffc045b
...
...
@@ -474,8 +474,10 @@ bool ResizeManipulator::isInvalidSize(const QSizeF & size)
void
ResizeManipulator
::
deleteSnapLines
()
{
if
(
m_layerItem
)
{
foreach
(
QGraphicsItem
*
item
,
m_graphicsLineList
)
foreach
(
QGraphicsItem
*
item
,
m_graphicsLineList
)
{
m_layerItem
->
scene
()
->
removeItem
(
item
);
delete
item
;
}
}
m_graphicsLineList
.
clear
();
...
...
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