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
454db638
Commit
454db638
authored
Apr 10, 2020
by
Laurent Montel
😁
Browse files
Port deprecated method
parent
6a5d176b
Pipeline
#18091
failed with stage
in 60 minutes and 1 second
Changes
20
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
renderer/kdenlive_render.cpp
View file @
454db638
...
...
@@ -56,7 +56,11 @@ int main(int argc, char **argv)
if
(
args
.
count
()
>
0
&&
args
.
at
(
0
)
==
QLatin1String
(
"-split"
))
{
args
.
removeFirst
();
// chunks to render
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
chunks
=
args
.
at
(
0
).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
);
#else
QStringList
chunks
=
args
.
at
(
0
).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
#endif
args
.
removeFirst
();
// chunk size in frames
int
chunkSize
=
args
.
at
(
0
).
toInt
();
...
...
@@ -68,7 +72,11 @@ int main(int argc, char **argv)
QString
extension
=
args
.
at
(
0
);
args
.
removeFirst
();
// avformat consumer params
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
consumerParams
=
args
.
at
(
0
).
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
consumerParams
=
args
.
at
(
0
).
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
args
.
removeFirst
();
QDir
baseFolder
(
target
);
Mlt
::
Factory
::
init
();
...
...
src/assets/model/assetparametermodel.cpp
View file @
454db638
...
...
@@ -206,7 +206,11 @@ void AssetParameterModel::internalSetParameter(const QString &name, const QStrin
locale
.
setNumberOptions
(
QLocale
::
OmitGroupSeparator
);
// TODO: this does not really belong here, but I don't see another way to do it so that undo works
if
(
data
(
paramIndex
,
AssetParameterModel
::
TypeRole
).
value
<
ParamType
>
()
==
ParamType
::
Curve
)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
vals
=
paramValue
.
split
(
QLatin1Char
(
';'
),
QString
::
SkipEmptyParts
);
#else
QStringList
vals
=
paramValue
.
split
(
QLatin1Char
(
';'
),
Qt
::
SkipEmptyParts
);
#endif
int
points
=
vals
.
size
();
m_asset
->
set
(
"3"
,
points
/
10.
);
m_params
[
QStringLiteral
(
"3"
)].
value
=
points
/
10.
;
...
...
src/assets/view/widgets/buttonparamwidget.cpp
View file @
454db638
...
...
@@ -44,8 +44,16 @@ ButtonParamWidget::ButtonParamWidget(std::shared_ptr<AssetParameterModel> model,
//setEnabled(m_model->getOwnerId().first != ObjectType::TimelineTrack);
auto
*
layout
=
new
QVBoxLayout
(
this
);
QVariantList
filterData
=
m_model
->
data
(
m_index
,
AssetParameterModel
::
FilterJobParamsRole
).
toList
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
filterAddedParams
=
m_model
->
data
(
m_index
,
AssetParameterModel
::
FilterParamsRole
).
toString
().
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
filterAddedParams
=
m_model
->
data
(
m_index
,
AssetParameterModel
::
FilterParamsRole
).
toString
().
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
consumerParams
=
m_model
->
data
(
m_index
,
AssetParameterModel
::
FilterConsumerParamsRole
).
toString
().
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
consumerParams
=
m_model
->
data
(
m_index
,
AssetParameterModel
::
FilterConsumerParamsRole
).
toString
().
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
QString
conditionalInfo
;
for
(
const
QVariant
jobElement
:
filterData
)
{
...
...
src/assets/view/widgets/keyframeedit.cpp
View file @
454db638
...
...
@@ -150,7 +150,11 @@ void KeyframeEdit::addParameter(QModelIndex index, int activeKeyframe)
QStringList
frames
;
/*if (e.hasAttribute(QStringLiteral("keyframes"))) {
// Effects have keyframes in a "keyframe" attribute, not sure why
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
frames = e.attribute(QStringLiteral("keyframes")).split(QLatin1Char(';'), QString::SkipEmptyParts);
#else
frames = e.attribute(QStringLiteral("keyframes")).split(QLatin1Char(';'), Qt::SkipEmptyParts);
#endif
m_keyframesTag = true;
} else {*/
// Transitions take keyframes from the value param
...
...
@@ -158,7 +162,11 @@ void KeyframeEdit::addParameter(QModelIndex index, int activeKeyframe)
if
(
!
framesValue
.
contains
(
QLatin1Char
(
'='
)))
{
framesValue
.
prepend
(
QStringLiteral
(
"0="
));
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
frames
=
framesValue
.
split
(
QLatin1Char
(
';'
),
QString
::
SkipEmptyParts
);
#else
frames
=
framesValue
.
split
(
QLatin1Char
(
';'
),
Qt
::
SkipEmptyParts
);
#endif
m_keyframesTag
=
false
;
//}
for
(
int
i
=
0
;
i
<
frames
.
count
();
++
i
)
{
...
...
src/bin/bin.cpp
View file @
454db638
...
...
@@ -3366,7 +3366,11 @@ void Bin::slotGotFilterJobResults(const QString &id, int startPos, int track, co
QString label = filterInfo.value(QStringLiteral("label"));
QString key = filterInfo.value(QStringLiteral("key"));
int offset = filterInfo.value(QStringLiteral("offset")).toInt();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList value = results.value(key).split(QLatin1Char(';'), QString::SkipEmptyParts);
#else
QStringList value = results.value(key).split(QLatin1Char(';'), Qt::SkipEmptyParts);
#endif
// qCDebug(KDENLIVE_LOG)<<"// RESULT; "<<key<<" = "<<value;
if (filterInfo.contains(QStringLiteral("resultmessage"))) {
QString mess = filterInfo.value(QStringLiteral("resultmessage"));
...
...
src/capture/mltdevicecapture.cpp
View file @
454db638
...
...
@@ -366,7 +366,11 @@ bool MltDeviceCapture::slotStartCapture(const QString ¶ms, const QString &pa
// without this line a call to mlt_properties_get_int(terminate on pause) for in mlt/src/modules/core/consumer_multi.c is returning 1
// and going into and endless loop.
renderProps
->
set
(
"mlt_profile"
,
m_activeProfile
.
toUtf8
().
constData
());
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
paramList
=
params
.
split
(
' '
,
QString
::
SkipEmptyParts
);
#else
const
QStringList
paramList
=
params
.
split
(
' '
,
Qt
::
SkipEmptyParts
);
#endif
for
(
int
i
=
0
;
i
<
paramList
.
count
();
++
i
)
{
tmp
=
qstrdup
(
paramList
.
at
(
i
).
section
(
QLatin1Char
(
'='
),
0
,
0
).
toUtf8
().
constData
());
QString
value
=
paramList
.
at
(
i
).
section
(
QLatin1Char
(
'='
),
1
,
1
);
...
...
src/dialogs/clipcreationdialog.cpp
View file @
454db638
...
...
@@ -90,7 +90,11 @@ QStringList ClipCreationDialog::getExtensions()
}
}
// process custom user extensions
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
customs
=
KdenliveSettings
::
addedExtensions
().
split
(
' '
,
QString
::
SkipEmptyParts
);
#else
const
QStringList
customs
=
KdenliveSettings
::
addedExtensions
().
split
(
' '
,
Qt
::
SkipEmptyParts
);
#endif
if
(
!
customs
.
isEmpty
())
{
for
(
const
QString
&
ext
:
customs
)
{
if
(
ext
.
startsWith
(
QLatin1String
(
"*."
)))
{
...
...
src/dialogs/kdenlivesettingsdialog.cpp
View file @
454db638
...
...
@@ -1269,17 +1269,29 @@ void KdenliveSettingsDialog::slotUpdatev4lDevice()
m_configCapture
.
kcfg_v4l_format
->
addItem
(
i18n
(
"Current settings"
));
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
pixelformats
=
info
.
split
(
'>'
,
QString
::
SkipEmptyParts
);
#else
QStringList
pixelformats
=
info
.
split
(
'>'
,
Qt
::
SkipEmptyParts
);
#endif
QString
itemSize
;
QString
pixelFormat
;
QStringList
itemRates
;
for
(
int
i
=
0
;
i
<
pixelformats
.
count
();
++
i
)
{
QString
format
=
pixelformats
.
at
(
i
).
section
(
QLatin1Char
(
':'
),
0
,
0
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
sizes
=
pixelformats
.
at
(
i
).
split
(
':'
,
QString
::
SkipEmptyParts
);
#else
QStringList
sizes
=
pixelformats
.
at
(
i
).
split
(
':'
,
Qt
::
SkipEmptyParts
);
#endif
pixelFormat
=
sizes
.
takeFirst
();
for
(
int
j
=
0
;
j
<
sizes
.
count
();
++
j
)
{
itemSize
=
sizes
.
at
(
j
).
section
(
QLatin1Char
(
'='
),
0
,
0
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
itemRates
=
sizes
.
at
(
j
).
section
(
QLatin1Char
(
'='
),
1
,
1
).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
);
#else
itemRates
=
sizes
.
at
(
j
).
section
(
QLatin1Char
(
'='
),
1
,
1
).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
#endif
for
(
int
k
=
0
;
k
<
itemRates
.
count
();
++
k
)
{
m_configCapture
.
kcfg_v4l_format
->
addItem
(
QLatin1Char
(
'['
)
+
format
+
QStringLiteral
(
"] "
)
+
itemSize
+
QStringLiteral
(
" ("
)
+
itemRates
.
at
(
k
)
+
QLatin1Char
(
')'
),
...
...
src/dialogs/renderwidget.cpp
View file @
454db638
...
...
@@ -553,7 +553,11 @@ void RenderWidget::slotSaveProfile()
ui
.
setupUi
(
d
);
QString
customGroup
;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
arguments
=
m_view
.
advanced_params
->
toPlainText
().
split
(
' '
,
QString
::
SkipEmptyParts
);
#else
QStringList
arguments
=
m_view
.
advanced_params
->
toPlainText
().
split
(
' '
,
Qt
::
SkipEmptyParts
);
#endif
if
(
!
arguments
.
isEmpty
())
{
ui
.
parameters
->
setText
(
arguments
.
join
(
QLatin1Char
(
' '
)));
}
...
...
@@ -2304,17 +2308,37 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable)
childitem
->
setData
(
0
,
StandardRole
,
standard
);
childitem
->
setData
(
0
,
ParamsRole
,
params
);
if
(
params
.
contains
(
QLatin1String
(
"%quality"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
childitem
->
setData
(
0
,
BitratesRole
,
profile
.
attribute
(
QStringLiteral
(
"qualities"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
));
#else
childitem
->
setData
(
0
,
BitratesRole
,
profile
.
attribute
(
QStringLiteral
(
"qualities"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
}
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
}
if
(
params
.
contains
(
QLatin1String
(
"%audioquality"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
childitem
->
setData
(
0
,
AudioBitratesRole
,
profile
.
attribute
(
QStringLiteral
(
"audioqualities"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
));
#else
childitem
->
setData
(
0
,
AudioBitratesRole
,
profile
.
attribute
(
QStringLiteral
(
"audioqualities"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
}
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
}
if
(
profile
.
hasAttribute
(
QStringLiteral
(
"speeds"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
childitem
->
setData
(
0
,
SpeedsRole
,
profile
.
attribute
(
QStringLiteral
(
"speeds"
)).
split
(
QLatin1Char
(
';'
),
QString
::
SkipEmptyParts
));
#else
childitem
->
setData
(
0
,
SpeedsRole
,
profile
.
attribute
(
QStringLiteral
(
"speeds"
)).
split
(
QLatin1Char
(
';'
),
Qt
::
SkipEmptyParts
));
#endif
}
if
(
profile
.
hasAttribute
(
QStringLiteral
(
"url"
)))
{
childitem
->
setData
(
0
,
ExtraRole
,
profile
.
attribute
(
QStringLiteral
(
"url"
)));
...
...
@@ -2393,18 +2417,38 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable)
item
->
setData
(
0
,
StandardRole
,
standard
);
item
->
setData
(
0
,
ParamsRole
,
params
);
if
(
params
.
contains
(
QLatin1String
(
"%quality"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
item
->
setData
(
0
,
BitratesRole
,
profileElement
.
attribute
(
QStringLiteral
(
"qualities"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
));
#else
item
->
setData
(
0
,
BitratesRole
,
profileElement
.
attribute
(
QStringLiteral
(
"qualities"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
}
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
}
if
(
params
.
contains
(
QLatin1String
(
"%audioquality"
)))
{
item
->
setData
(
0
,
AudioBitratesRole
,
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
profileElement
.
attribute
(
QStringLiteral
(
"audioqualities"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
));
#else
profileElement
.
attribute
(
QStringLiteral
(
"audioqualities"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
}
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
}
if
(
profileElement
.
hasAttribute
(
QStringLiteral
(
"speeds"
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
item
->
setData
(
0
,
SpeedsRole
,
profileElement
.
attribute
(
QStringLiteral
(
"speeds"
)).
split
(
QLatin1Char
(
';'
),
QString
::
SkipEmptyParts
));
#else
item
->
setData
(
0
,
SpeedsRole
,
profileElement
.
attribute
(
QStringLiteral
(
"speeds"
)).
split
(
QLatin1Char
(
';'
),
Qt
::
SkipEmptyParts
));
#endif
}
if
(
profileElement
.
hasAttribute
(
QStringLiteral
(
"url"
)))
{
item
->
setData
(
0
,
ExtraRole
,
profileElement
.
attribute
(
QStringLiteral
(
"url"
)));
...
...
src/dialogs/wizard.cpp
View file @
454db638
...
...
@@ -332,17 +332,29 @@ void Wizard::slotUpdateCaptureParameters()
<<
QString
::
number
(
profileInfo
->
height
())
<<
QString
::
number
(
profileInfo
->
frame_rate_num
())
<<
QString
::
number
(
profileInfo
->
frame_rate_den
()));
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
pixelformats
=
formats
.
split
(
'>'
,
QString
::
SkipEmptyParts
);
#else
QStringList
pixelformats
=
formats
.
split
(
'>'
,
Qt
::
SkipEmptyParts
);
#endif
QString
itemSize
;
QString
pixelFormat
;
QStringList
itemRates
;
for
(
int
i
=
0
;
i
<
pixelformats
.
count
();
++
i
)
{
QString
format
=
pixelformats
.
at
(
i
).
section
(
QLatin1Char
(
':'
),
0
,
0
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
sizes
=
pixelformats
.
at
(
i
).
split
(
':'
,
QString
::
SkipEmptyParts
);
#else
QStringList
sizes
=
pixelformats
.
at
(
i
).
split
(
':'
,
Qt
::
SkipEmptyParts
);
#endif
pixelFormat
=
sizes
.
takeFirst
();
for
(
int
j
=
0
;
j
<
sizes
.
count
();
++
j
)
{
itemSize
=
sizes
.
at
(
j
).
section
(
QLatin1Char
(
'='
),
0
,
0
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
itemRates
=
sizes
.
at
(
j
).
section
(
QLatin1Char
(
'='
),
1
,
1
).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
);
#else
itemRates
=
sizes
.
at
(
j
).
section
(
QLatin1Char
(
'='
),
1
,
1
).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
#endif
for
(
int
k
=
0
;
k
<
itemRates
.
count
();
++
k
)
{
QString
formatDescription
=
QLatin1Char
(
'['
)
+
format
+
QStringLiteral
(
"] "
)
+
itemSize
+
QStringLiteral
(
" ("
)
+
itemRates
.
at
(
k
)
+
QLatin1Char
(
')'
);
...
...
src/effects/effectlist/model/effecttreemodel.cpp
View file @
454db638
...
...
@@ -63,7 +63,11 @@ std::shared_ptr<EffectTreeModel> EffectTreeModel::construct(const QString &categ
if
(
!
KdenliveSettings
::
gpu_accel
()
&&
groupName
==
i18n
(
"GPU effects"
))
{
continue
;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
list
=
groups
.
at
(
i
).
toElement
().
attribute
(
QStringLiteral
(
"list"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
);
#else
QStringList
list
=
groups
.
at
(
i
).
toElement
().
attribute
(
QStringLiteral
(
"list"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
#endif
auto
groupItem
=
self
->
rootItem
->
appendChild
(
QList
<
QVariant
>
{
groupName
,
QStringLiteral
(
"root"
)});
for
(
const
QString
&
effect
:
list
)
{
effectCategory
[
effect
]
=
groupItem
;
...
...
src/effects/effectstack/view/collapsibleeffectview.cpp
View file @
454db638
...
...
@@ -751,7 +751,11 @@ void CollapsibleEffectView::importKeyframes(const QString &kf)
{
QMap
<
QString
,
QString
>
keyframes
;
if
(
kf
.
contains
(
QLatin1Char
(
'\n'
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
params
=
kf
.
split
(
QLatin1Char
(
'\n'
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
params
=
kf
.
split
(
QLatin1Char
(
'\n'
),
Qt
::
SkipEmptyParts
);
#endif
for
(
const
QString
&
param
:
params
)
{
keyframes
.
insert
(
param
.
section
(
QLatin1Char
(
'='
),
0
,
0
),
param
.
section
(
QLatin1Char
(
'='
),
1
));
}
...
...
src/jobs/cutclipjob.cpp
View file @
454db638
...
...
@@ -104,7 +104,11 @@ int CutClipJob::prepareJob(const std::shared_ptr<JobManager> &ptr, const std::ve
return
-
1
;
}
path
=
ui
.
file_url
->
url
().
toLocalFile
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
encodingParams
=
ui
.
extra_params
->
toPlainText
().
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
encodingParams
=
ui
.
extra_params
->
toPlainText
().
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
KdenliveSettings
::
setAdd_new_clip
(
ui
.
add_clip
->
isChecked
());
delete
d
;
...
...
src/jobs/proxyclipjob.cpp
View file @
454db638
...
...
@@ -100,7 +100,11 @@ bool ProxyJob::startJob()
parameter
.
prepend
(
QStringLiteral
(
"-pix_fmt yuv420p"
));
}
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
params
=
parameter
.
split
(
QLatin1Char
(
'-'
),
QString
::
SkipEmptyParts
);
#else
QStringList
params
=
parameter
.
split
(
QLatin1Char
(
'-'
),
Qt
::
SkipEmptyParts
);
#endif
double
display_ratio
;
if
(
source
.
startsWith
(
QLatin1String
(
"consumer:"
)))
{
display_ratio
=
KdenliveDoc
::
getDisplayRatio
(
source
.
section
(
QLatin1Char
(
':'
),
1
));
...
...
@@ -270,7 +274,11 @@ bool ProxyJob::startJob()
parameters
<<
QStringLiteral
(
"-i"
)
<<
source
;
}
QString
params
=
proxyParams
;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
for
(
const
QString
&
s
:
params
.
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
))
{
#else
for
(
const
QString
&
s
:
params
.
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
))
{
#endif
QString
t
=
s
.
simplified
();
if
(
t
!=
QLatin1String
(
"-noautorotate"
))
{
parameters
<<
t
;
...
...
src/jobs/transcodeclipjob.cpp
View file @
454db638
...
...
@@ -84,7 +84,11 @@ bool TranscodeJob::startJob()
// insert transcoded filename
m_transcodeParams
.
replace
(
QStringLiteral
(
"%1"
),
QString
(
"-consumer %1"
));
// Convert param style
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
params
=
m_transcodeParams
.
split
(
QLatin1Char
(
'-'
),
QString
::
SkipEmptyParts
);
#else
QStringList
params
=
m_transcodeParams
.
split
(
QLatin1Char
(
'-'
),
Qt
::
SkipEmptyParts
);
#endif
QStringList
mltParameters
;
for
(
const
QString
&
s
:
params
)
{
QString
t
=
s
.
simplified
();
...
...
src/main.cpp
View file @
454db638
...
...
@@ -271,7 +271,11 @@ int main(int argc, char *argv[])
}
}
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
progArgs
=
QString
(
*
argv
).
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
progArgs
=
QString
(
*
argv
).
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
// Remove app name
progArgs
.
takeFirst
();
auto
*
restart
=
new
QProcess
;
...
...
src/monitor/glwidget.cpp
View file @
454db638
...
...
@@ -1033,7 +1033,11 @@ int GLWidget::reconfigureMulti(const QString ¶ms, const QString &path, Mlt::
m_consumer->set("1.terminate_on_pause", 0);
// m_consumer->set("1.terminate_on_pause", 0);// was commented out. restoring it fixes mantis#3415 - FFmpeg recording freezes
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList paramList = params.split(' ', QString::SkipEmptyParts);
#else
QStringList paramList = params.split(' ', Qt::SkipEmptyParts);
#endif
for (int i = 0; i < paramList.count(); ++i) {
QString key = "1." + paramList.at(i).section(QLatin1Char('='), 0, 0);
QString value = paramList.at(i).section(QLatin1Char('='), 1, 1);
...
...
src/project/cliptranscode.cpp
View file @
454db638
...
...
@@ -176,7 +176,11 @@ void ClipTranscode::slotStartTransCode()
if
(
mltEncoding
)
{
params
.
replace
(
QStringLiteral
(
"%1"
),
QString
(
"-consumer %1"
));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
splitted
=
params
.
split
(
QLatin1Char
(
'-'
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
splitted
=
params
.
split
(
QLatin1Char
(
'-'
),
Qt
::
SkipEmptyParts
);
#endif
for
(
const
QString
&
s
:
splitted
)
{
QString
t
=
s
.
simplified
();
if
(
t
.
count
(
QLatin1Char
(
' '
))
==
0
)
{
...
...
src/timeline2/view/previewmanager.cpp
View file @
454db638
...
...
@@ -266,11 +266,19 @@ bool PreviewManager::loadParams()
{
KdenliveDoc
*
doc
=
pCore
->
currentDoc
();
m_extension
=
doc
->
getDocumentProperty
(
QStringLiteral
(
"previewextension"
));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
m_consumerParams
=
doc
->
getDocumentProperty
(
QStringLiteral
(
"previewparameters"
)).
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
m_consumerParams
=
doc
->
getDocumentProperty
(
QStringLiteral
(
"previewparameters"
)).
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
if
(
m_consumerParams
.
isEmpty
()
||
m_extension
.
isEmpty
())
{
doc
->
selectPreviewProfile
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
m_consumerParams
=
doc
->
getDocumentProperty
(
QStringLiteral
(
"previewparameters"
)).
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
m_consumerParams
=
doc
->
getDocumentProperty
(
QStringLiteral
(
"previewparameters"
)).
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
m_extension
=
doc
->
getDocumentProperty
(
QStringLiteral
(
"previewextension"
));
}
if
(
m_consumerParams
.
isEmpty
()
||
m_extension
.
isEmpty
())
{
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
454db638
...
...
@@ -1642,8 +1642,16 @@ void TimelineController::loadPreview(const QString &chunks, const QString &dirty
}
QVariantList
renderedChunks
;
QVariantList
dirtyChunks
;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
chunksList
=
chunks
.
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
);
#else
QStringList
chunksList
=
chunks
.
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
dirtyList
=
dirty
.
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
);
#else
QStringList
dirtyList
=
dirty
.
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
#endif
for
(
const
QString
&
frame
:
chunksList
)
{
renderedChunks
<<
frame
.
toInt
();
}
...
...
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