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
18a73708
Commit
18a73708
authored
Jul 13, 2020
by
Jean-Baptiste Mardelle
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't allow embedding a project in itself.
Related to
#737
parent
9cac6b3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/bin/clipcreator.cpp
src/bin/clipcreator.cpp
+7
-1
No files found.
src/bin/clipcreator.cpp
View file @
18a73708
...
...
@@ -88,8 +88,14 @@ QString ClipCreator::createColorClip(const QString &color, int duration, const Q
QDomDocument
ClipCreator
::
getXmlFromUrl
(
const
QString
&
path
)
{
QDomDocument
xml
;
QUrl
fileUrl
=
QUrl
::
fromLocalFile
(
path
);
if
(
fileUrl
.
matches
(
pCore
->
currentDoc
()
->
url
(),
QUrl
::
RemoveScheme
|
QUrl
::
NormalizePathSegments
))
{
// Cannot embed a project in itself
KMessageBox
::
sorry
(
QApplication
::
activeWindow
(),
i18n
(
"You cannot add a project inside itself."
),
i18n
(
"Cannot create clip"
));
return
xml
;
}
QMimeDatabase
db
;
QMimeType
type
=
db
.
mimeTypeForUrl
(
QUrl
::
fromLocalFile
(
path
)
);
QMimeType
type
=
db
.
mimeTypeForUrl
(
fileUrl
);
QDomElement
prod
;
qDebug
()
<<
"=== GOT DROPPPED MIME: "
<<
type
.
name
();
...
...
Eugen Mohr
@emohr
mentioned in issue
#606 (closed)
·
Jul 14, 2020
mentioned in issue
#606 (closed)
mentioned in issue #606
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