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
d568a084
Commit
d568a084
authored
Dec 18, 2019
by
Jean-Baptiste Mardelle
Browse files
Don't show unsupported effect groups in UI (causing crash)
Related to
#493
parent
b3cb1389
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/effects/effectsrepository.cpp
View file @
d568a084
...
...
@@ -74,22 +74,11 @@ void EffectsRepository::parseCustomAssetFile(const QString &file_name, std::unor
file
.
close
();
QDomElement
base
=
doc
.
documentElement
();
if
(
base
.
tagName
()
==
QLatin1String
(
"effectgroup"
))
{
// in that case we have a custom effect
Info
info
;
info
.
xml
=
base
;
info
.
type
=
EffectType
::
Custom
;
QString
tag
=
base
.
attribute
(
QStringLiteral
(
"tag"
),
QString
());
QString
id
=
base
.
hasAttribute
(
QStringLiteral
(
"id"
))
?
base
.
attribute
(
QStringLiteral
(
"id"
))
:
tag
;
QString
name
=
base
.
attribute
(
QStringLiteral
(
"name"
),
QString
());
info
.
name
=
name
;
info
.
id
=
id
;
info
.
mltId
=
tag
;
if
(
customAssets
.
count
(
id
)
>
0
)
{
qDebug
()
<<
"Error: conflicting effect name"
<<
id
;
}
else
{
customAssets
[
id
]
=
info
;
QDomNodeList
effects
=
base
.
elementsByTagName
(
QStringLiteral
(
"effect"
));
if
(
effects
.
count
()
!=
1
)
{
qDebug
()
<<
"Error: found unsupported effect group"
<<
base
.
attribute
(
QStringLiteral
(
"name"
))
<<
" : "
<<
file_name
;
return
;
}
return
;
}
QDomNodeList
effects
=
doc
.
elementsByTagName
(
QStringLiteral
(
"effect"
));
...
...
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