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
Ark
Commits
36c6cfec
Commit
36c6cfec
authored
Feb 14, 2021
by
Elvis Angelaccio
Browse files
Part: fix memory leak
m_fileWatcher was never getting deleted.
parent
27973370
Changes
2
Show whitespace changes
Inline
Side-by-side
part/part.cpp
View file @
36c6cfec
...
...
@@ -1036,8 +1036,8 @@ void Part::slotOpenExtractedEntry(KJob *job)
const
QString
fullName
=
openJob
->
validatedFilePath
();
if
(
isArchiveWritable
())
{
m_fileWatcher
=
new
QFileSystemWatcher
;
connect
(
m_fileWatcher
,
&
QFileSystemWatcher
::
fileChanged
,
this
,
&
Part
::
slotWatchedFileModified
);
m_fileWatcher
.
reset
(
new
QFileSystemWatcher
)
;
connect
(
m_fileWatcher
.
get
()
,
&
QFileSystemWatcher
::
fileChanged
,
this
,
&
Part
::
slotWatchedFileModified
);
m_fileWatcher
->
addPath
(
fullName
);
}
else
{
// If archive is readonly set temporarily extracted file to readonly as
...
...
part/part.h
View file @
36c6cfec
...
...
@@ -231,7 +231,7 @@ private:
KAbstractWidgetJobTracker
*
m_jobTracker
;
KParts
::
StatusBarExtension
*
m_statusBarExtension
;
QVBoxLayout
*
m_vlayout
;
QFileSystemWatcher
*
m_fileWatcher
;
std
::
unique_ptr
<
QFileSystemWatcher
>
m_fileWatcher
;
QSplitter
*
m_commentSplitter
;
QGroupBox
*
m_commentBox
;
QPlainTextEdit
*
m_commentView
;
...
...
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