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
Utilities
Ark
Commits
f9f71649
Commit
f9f71649
authored
Sep 28, 2022
by
Elvis Angelaccio
Browse files
Stop killing extraction/compression jobs when dolphin quits
BUG: 459346
FIXED-IN: 22.08.2
parent
e67ea2a5
Pipeline
#238106
passed with stage
in 1 minute and 23 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
app/compressfileitemaction.cpp
View file @
f9f71649
...
...
@@ -100,7 +100,8 @@ QAction *CompressFileItemAction::createAction(const QIcon &icon, QWidget *parent
QAction
*
action
=
new
QAction
(
icon
,
name
,
parent
);
connect
(
action
,
&
QAction
::
triggered
,
this
,
[
fileExtension
,
urls
,
name
,
parent
,
this
]()
{
auto
*
addToArchiveJob
=
new
AddToArchive
(
parent
);
// Don't pass a parent to the job, otherwise it will be killed if dolphin gets closed.
auto
*
addToArchiveJob
=
new
AddToArchive
(
nullptr
);
addToArchiveJob
->
setImmediateProgressReporting
(
true
);
addToArchiveJob
->
setChangeToFirstPath
(
true
);
for
(
const
QUrl
&
url
:
urls
)
{
...
...
@@ -121,6 +122,7 @@ QAction *CompressFileItemAction::createAction(const QIcon &icon, QWidget *parent
}
else
if
(
!
addToArchiveJob
->
errorString
().
isEmpty
())
{
Q_EMIT
error
(
addToArchiveJob
->
errorString
());
}
addToArchiveJob
->
deleteLater
();
});
});
...
...
app/extractfileitemaction.cpp
View file @
f9f71649
...
...
@@ -100,7 +100,8 @@ QAction *ExtractFileItemAction::createAction(const QIcon& icon, const QString& n
{
QAction
*
action
=
new
QAction
(
icon
,
name
,
parent
);
connect
(
action
,
&
QAction
::
triggered
,
this
,
[
urls
,
name
,
option
,
parent
,
this
]()
{
auto
*
batchExtractJob
=
new
BatchExtract
(
parent
);
// Don't pass a parent to the job, otherwise it will be killed if dolphin gets closed.
auto
*
batchExtractJob
=
new
BatchExtract
(
nullptr
);
batchExtractJob
->
setDestinationFolder
(
QFileInfo
(
urls
.
first
().
toLocalFile
()).
path
());
batchExtractJob
->
setOpenDestinationAfterExtraction
(
ArkSettings
::
openDestinationFolderAfterExtraction
());
if
(
option
==
AutoSubfolder
)
{
...
...
@@ -119,6 +120,7 @@ QAction *ExtractFileItemAction::createAction(const QIcon& icon, const QString& n
if
(
!
batchExtractJob
->
errorString
().
isEmpty
())
{
Q_EMIT
error
(
batchExtractJob
->
errorString
());
}
batchExtractJob
->
deleteLater
();
});
});
return
action
;
...
...
Elvis Angelaccio
@elvisangelaccio
mentioned in commit
291f8927
·
Sep 28, 2022
mentioned in commit
291f8927
mentioned in commit 291f8927211a036bf0c84e8548061c52b235c2dc
Toggle commit list
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