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
Multimedia
Kdenlive
Commits
272290c7
Commit
272290c7
authored
Nov 22, 2022
by
Jean-Baptiste Mardelle
Browse files
Correctly stop archiving job on pressing abort
Related to
#999
parent
23f8c5c8
Pipeline
#272702
passed with stage
in 14 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/project/dialogs/archivewidget.cpp
View file @
272290c7
...
...
@@ -363,9 +363,14 @@ bool ArchiveWidget::closeAccepted()
KGuiItem
(
i18n
(
"Stop Archiving"
)))
!=
KMessageBox
::
Continue
)
{
return
false
;
}
m_infoMessage
->
setMessageType
(
KMessageWidget
::
Information
);
m_infoMessage
->
setText
(
i18n
(
"Abort processing"
));
m_infoMessage
->
animatedShow
();
m_abortArchive
=
true
;
if
(
m_copyJob
)
{
m_copyJob
->
kill
();
}
m_archiveThread
.
waitForFinished
();
}
return
true
;
}
...
...
@@ -584,6 +589,7 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass)
proxy_only
->
setEnabled
(
false
);
timeline_archive
->
setEnabled
(
false
);
buttonBox
->
button
(
QDialogButtonBox
::
Apply
)
->
setEnabled
(
false
);
buttonBox
->
button
(
QDialogButtonBox
::
Close
)
->
setText
(
i18n
(
"Abort"
));
bool
isArchive
=
compressed_archive
->
isChecked
();
if
(
!
firstPass
)
{
...
...
@@ -775,6 +781,7 @@ void ArchiveWidget::slotArchivingFinished(KJob *job, bool finished)
}
else
{
slotJobResult
(
false
,
i18n
(
"There was an error processing project file"
));
}
buttonBox
->
button
(
QDialogButtonBox
::
Close
)
->
setText
(
i18n
(
"Close"
));
}
else
{
processProjectFile
();
}
...
...
@@ -1103,10 +1110,13 @@ void ArchiveWidget::createArchive()
success
=
archive
->
addLocalFile
(
i
.
key
(),
i
.
value
());
emit
archiveProgress
(
100
*
ix
/
max
);
ix
++
;
if
(
!
success
)
{
if
(
!
success
||
m_abortArchive
)
{
break
;
}
}
if
(
m_abortArchive
)
{
return
;
}
// Add project file
if
(
!
m_temp
)
{
...
...
@@ -1147,6 +1157,7 @@ void ArchiveWidget::slotArchivingBoolFinished(bool result)
files_list
->
topLevelItem
(
i
)
->
child
(
j
)
->
setDisabled
(
false
);
}
}
buttonBox
->
button
(
QDialogButtonBox
::
Close
)
->
setText
(
i18n
(
"Close"
));
}
void
ArchiveWidget
::
slotArchivingIntProgress
(
int
p
)
...
...
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