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
Utilities
Kate
Commits
ceb40a57
Commit
ceb40a57
authored
Oct 03, 2021
by
Ahmad Samir
Browse files
ExternalTools: use a unique_ptr to be sure we don't leak memory
parent
13de60ae
Pipeline
#87428
passed with stage
in 2 minutes and 49 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
addons/externaltools/kateexternaltoolsconfigwidget.cpp
View file @
ceb40a57
...
...
@@ -483,11 +483,9 @@ void KateExternalToolsConfigWidget::slotAddCategory()
void
KateExternalToolsConfigWidget
::
slotAddTool
()
{
auto
tool
=
new
KateExternalTool
();
if
(
editTool
(
tool
))
{
addNewTool
(
tool
);
}
else
{
delete
tool
;
std
::
unique_ptr
tool
=
std
::
make_unique
<
KateExternalTool
>
();
if
(
editTool
(
tool
.
get
()))
{
addNewTool
(
tool
.
release
());
}
}
...
...
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