Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWayland Server
Commits
d640d1c0
Commit
d640d1c0
authored
May 05, 2021
by
Vlad Zahorodnii
Browse files
Prevent potential QMap detaching
Store resourceMap() in a local const variable to avoid detaching.
parent
43c96cdd
Pipeline
#60834
passed with stage
in 5 minutes and 3 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/server/xdgoutput_v1_interface.cpp
View file @
d640d1c0
...
...
@@ -121,7 +121,9 @@ void XdgOutputV1Interface::setLogicalSize(const QSize &size)
}
d
->
size
=
size
;
d
->
dirty
=
true
;
for
(
auto
resource
:
d
->
resourceMap
())
{
const
auto
outputResources
=
d
->
resourceMap
();
for
(
auto
resource
:
outputResources
)
{
d
->
send_logical_size
(
resource
->
handle
,
size
.
width
(),
size
.
height
());
}
}
...
...
@@ -138,7 +140,9 @@ void XdgOutputV1Interface::setLogicalPosition(const QPoint &pos)
}
d
->
pos
=
pos
;
d
->
dirty
=
true
;
for
(
auto
resource
:
d
->
resourceMap
())
{
const
auto
outputResources
=
d
->
resourceMap
();
for
(
auto
resource
:
outputResources
)
{
d
->
send_logical_position
(
resource
->
handle
,
pos
.
x
(),
pos
.
y
());
}
}
...
...
@@ -167,7 +171,9 @@ void XdgOutputV1Interface::done()
return
;
}
d
->
dirty
=
false
;
for
(
auto
resource
:
d
->
resourceMap
())
{
const
auto
outputResources
=
d
->
resourceMap
();
for
(
auto
resource
:
outputResources
)
{
if
(
wl_resource_get_version
(
resource
->
handle
)
<
3
)
{
d
->
send_done
(
resource
->
handle
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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