Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
c0b3b54c
Commit
c0b3b54c
authored
Jun 23, 2019
by
Jean-Baptiste Mardelle
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix speed job overwrites without warning
Fixes
#262
parent
4708ac10
Pipeline
#4539
passed with stage
in 22 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
src/jobs/speedjob.cpp
src/jobs/speedjob.cpp
+12
-0
No files found.
src/jobs/speedjob.cpp
View file @
c0b3b54c
...
...
@@ -35,6 +35,7 @@
#include <QInputDialog>
#include <QScopedPointer>
#include <KIO/RenameDialog>
#include <mlt++/Mlt.h>
SpeedJob
::
SpeedJob
(
const
QString
&
binId
,
double
speed
,
QString
destUrl
)
...
...
@@ -83,6 +84,17 @@ int SpeedJob::prepareJob(const std::shared_ptr<JobManager> &ptr, const std::vect
auto
binClip
=
pCore
->
projectItemModel
()
->
getClipByBinID
(
binId
);
// Filter several clips, destination points to a folder
QString
mltfile
=
QFileInfo
(
binClip
->
url
()).
absoluteFilePath
()
+
QStringLiteral
(
".mlt"
);
if
(
QFile
::
exists
(
mltfile
))
{
KIO
::
RenameDialog
renameDialog
(
qApp
->
activeWindow
(),
QString
(),
/*i18n("File already exists"), */
QUrl
::
fromLocalFile
(
mltfile
),
QUrl
::
fromLocalFile
(
mltfile
),
KIO
::
RenameDialog_Option
::
RenameDialog_Overwrite
);
if
(
renameDialog
.
exec
()
==
QDialog
::
Accepted
)
{
QUrl
final
=
renameDialog
.
newDestUrl
();
if
(
final
.
isValid
())
{
mltfile
=
final
.
toLocalFile
();
}
}
else
{
return
-
1
;
}
}
destinations
[
binId
]
=
mltfile
;
}
// Now we have to create the jobs objects. This is trickier than usual, since the parameters are different for each job (each clip has its own
...
...
Eugen Mohr
@emohr
mentioned in issue
#261 (closed)
·
Jun 23, 2019
mentioned in issue
#261 (closed)
mentioned in issue #261
Toggle commit list
Write
Preview
Markdown
is supported
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