Skip to content
GitLab
Menu
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
18a73708
Commit
18a73708
authored
Jul 13, 2020
by
Jean-Baptiste Mardelle
Browse files
Don't allow embedding a project in itself.
Related to
#737
parent
9cac6b3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
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