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
PIM
PIM Messagelib
Commits
951de9ec
Commit
951de9ec
authored
Jun 24, 2020
by
Laurent Montel
Browse files
Make sure to delete all temporary dir
parent
fa2e7cd8
Pipeline
#24839
passed with stage
in 59 minutes and 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mimetreeparser/src/nodehelper.cpp
View file @
951de9ec
...
...
@@ -77,10 +77,11 @@ NodeHelper::NodeHelper()
NodeHelper
::~
NodeHelper
()
{
if
(
mAttachmentFilesDir
)
{
mAttachmentFilesDir
->
forceCleanTempFiles
();
delete
mAttachmentFilesDir
;
mAttachmentFilesDir
=
nullptr
;
for
(
auto
att
:
mListAttachmentTemporaryDirs
)
{
if
(
att
)
{
att
->
forceCleanTempFiles
();
delete
att
;
}
}
clear
();
}
...
...
@@ -337,6 +338,7 @@ void NodeHelper::removeTempFiles()
//Don't delete as it will be deleted in class
mAttachmentFilesDir
->
removeTempFiles
();
mAttachmentFilesDir
=
new
AttachmentTemporaryFilesDirs
();
mListAttachmentTemporaryDirs
.
append
(
mAttachmentFilesDir
);
}
void
NodeHelper
::
addTempFile
(
const
QString
&
file
)
...
...
mimetreeparser/src/nodehelper.h
View file @
951de9ec
...
...
@@ -32,6 +32,7 @@
#include
<QMap>
#include
<QSet>
#include
<QVector>
#include
<QPointer>
class
QUrl
;
class
QTextCodec
;
...
...
@@ -265,9 +266,9 @@ private:
QMap
<
QString
,
QMap
<
QByteArray
,
Interface
::
BodyPartMemento
*>
>
mBodyPartMementoMap
;
QMap
<
KMime
::
Content
*
,
PartMetaData
>
mPartMetaDatas
;
QMap
<
KMime
::
Message
::
Content
*
,
QVector
<
KMime
::
Content
*>
>
mExtraContents
;
AttachmentTemporaryFilesDirs
*
mAttachmentFilesDir
=
nullptr
;
QPointer
<
AttachmentTemporaryFilesDirs
>
mAttachmentFilesDir
;
QMap
<
const
KMime
::
Content
*
,
QVector
<
MessagePartPtr
>
>
mHeaderOverwrite
;
QVector
<
QPointer
<
AttachmentTemporaryFilesDirs
>
>
mListAttachmentTemporaryDirs
;
friend
class
NodeHelperTest
;
};
}
...
...
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