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
Plasma
KWin
Commits
7e80c54d
Commit
7e80c54d
authored
May 21, 2021
by
Aleix Pol Gonzalez
🐧
Browse files
textinput: prefer smart pointers
parent
961debb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wayland/inputmethod_v1_interface.cpp
View file @
7e80c54d
...
...
@@ -369,7 +369,7 @@ public:
send_activate
(
resource
->
handle
,
addedResource
->
handle
);
}
InputMethodContextV1Interface
*
m_context
=
nullptr
;
QScopedPointer
<
InputMethodContextV1Interface
>
m_context
;
InputMethodV1Interface
*
const
q
;
Display
*
const
m_display
;
};
...
...
@@ -388,7 +388,7 @@ void InputMethodV1Interface::sendActivate()
return
;
}
d
->
m_context
=
new
InputMethodContextV1Interface
(
this
);
d
->
m_context
.
reset
(
new
InputMethodContextV1Interface
(
this
)
)
;
for
(
auto
resource
:
d
->
resourceMap
())
{
auto
connection
=
d
->
m_context
->
d
->
add
(
resource
->
client
(),
resource
->
version
());
...
...
@@ -408,13 +408,12 @@ void InputMethodV1Interface::sendDeactivate()
d
->
send_deactivate
(
resource
->
handle
,
connection
->
handle
);
}
}
delete
d
->
m_context
;
d
->
m_context
=
nullptr
;
d
->
m_context
.
reset
();
}
InputMethodContextV1Interface
*
InputMethodV1Interface
::
context
()
const
{
return
d
->
m_context
;
return
d
->
m_context
.
get
()
;
}
}
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