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
4c668d8c
Commit
4c668d8c
authored
Apr 26, 2021
by
Julius Künzel
Browse files
Render presets: load default values properly to ui
CCBUG: 421174
parent
f559aa5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dialogs/renderwidget.cpp
View file @
4c668d8c
...
...
@@ -2368,12 +2368,14 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable)
#else
childitem
->
setData
(
0
,
BitratesRole
,
profile
.
attribute
(
QStringLiteral
(
"qualities"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
childitem
->
setData
(
0
,
DefaultBitrateRole
,
profile
.
attribute
(
QStringLiteral
(
"defaultquality"
)));
}
else
if
(
params
.
contains
(
QLatin1String
(
"%bitrate"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
childitem
->
setData
(
0
,
BitratesRole
,
profile
.
attribute
(
QStringLiteral
(
"bitrates"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
));
#else
childitem
->
setData
(
0
,
BitratesRole
,
profile
.
attribute
(
QStringLiteral
(
"bitrates"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
childitem
->
setData
(
0
,
DefaultBitrateRole
,
profile
.
attribute
(
QStringLiteral
(
"defaultbitrate"
)));
}
if
(
params
.
contains
(
QLatin1String
(
"%audioquality"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
...
...
@@ -2381,12 +2383,14 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable)
#else
childitem
->
setData
(
0
,
AudioBitratesRole
,
profile
.
attribute
(
QStringLiteral
(
"audioqualities"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
childitem
->
setData
(
0
,
DefaultAudioBitrateRole
,
profile
.
attribute
(
QStringLiteral
(
"defaultaudioquality"
)));
}
else
if
(
params
.
contains
(
QLatin1String
(
"%audiobitrate"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
childitem
->
setData
(
0
,
AudioBitratesRole
,
profile
.
attribute
(
QStringLiteral
(
"audiobitrates"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
));
#else
childitem
->
setData
(
0
,
AudioBitratesRole
,
profile
.
attribute
(
QStringLiteral
(
"audiobitrates"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
childitem
->
setData
(
0
,
DefaultAudioBitrateRole
,
profile
.
attribute
(
QStringLiteral
(
"defaultaudiobitrate"
)));
}
if
(
profile
.
hasAttribute
(
QStringLiteral
(
"speeds"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
...
...
@@ -2476,12 +2480,14 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable)
#else
item
->
setData
(
0
,
BitratesRole
,
profileElement
.
attribute
(
QStringLiteral
(
"qualities"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
item
->
setData
(
0
,
DefaultBitrateRole
,
profileElement
.
attribute
(
QStringLiteral
(
"defaultquality"
)));
}
else
if
(
params
.
contains
(
QLatin1String
(
"%bitrate"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
item
->
setData
(
0
,
BitratesRole
,
profileElement
.
attribute
(
QStringLiteral
(
"bitrates"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
));
#else
item
->
setData
(
0
,
BitratesRole
,
profileElement
.
attribute
(
QStringLiteral
(
"bitrates"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
item
->
setData
(
0
,
DefaultBitrateRole
,
profileElement
.
attribute
(
QStringLiteral
(
"defaultbitrate"
)));
}
if
(
params
.
contains
(
QLatin1String
(
"%audioquality"
)))
{
item
->
setData
(
0
,
AudioBitratesRole
,
...
...
@@ -2490,12 +2496,14 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable)
#else
profileElement
.
attribute
(
QStringLiteral
(
"audioqualities"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
item
->
setData
(
0
,
DefaultAudioBitrateRole
,
profileElement
.
attribute
(
QStringLiteral
(
"defaultaudioquality"
)));
}
else
if
(
params
.
contains
(
QLatin1String
(
"%audiobitrate"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
item
->
setData
(
0
,
AudioBitratesRole
,
profileElement
.
attribute
(
QStringLiteral
(
"audiobitrates"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
));
#else
item
->
setData
(
0
,
AudioBitratesRole
,
profileElement
.
attribute
(
QStringLiteral
(
"audiobitrates"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
item
->
setData
(
0
,
DefaultAudioBitrateRole
,
profileElement
.
attribute
(
QStringLiteral
(
"defaultaudiobitrate"
)));
}
if
(
profileElement
.
hasAttribute
(
QStringLiteral
(
"speeds"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
...
...
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