Commit 454db638 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port deprecated method

parent 6a5d176b
Pipeline #18091 failed with stage
in 60 minutes and 1 second
...@@ -56,7 +56,11 @@ int main(int argc, char **argv) ...@@ -56,7 +56,11 @@ int main(int argc, char **argv)
if (args.count() > 0 && args.at(0) == QLatin1String("-split")) { if (args.count() > 0 && args.at(0) == QLatin1String("-split")) {
args.removeFirst(); args.removeFirst();
// chunks to render // chunks to render
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList chunks = args.at(0).split(QLatin1Char(','), QString::SkipEmptyParts); QStringList chunks = args.at(0).split(QLatin1Char(','), QString::SkipEmptyParts);
#else
QStringList chunks = args.at(0).split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
args.removeFirst(); args.removeFirst();
// chunk size in frames // chunk size in frames
int chunkSize = args.at(0).toInt(); int chunkSize = args.at(0).toInt();
...@@ -68,7 +72,11 @@ int main(int argc, char **argv) ...@@ -68,7 +72,11 @@ int main(int argc, char **argv)
QString extension = args.at(0); QString extension = args.at(0);
args.removeFirst(); args.removeFirst();
// avformat consumer params // avformat consumer params
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList consumerParams = args.at(0).split(QLatin1Char(' '), QString::SkipEmptyParts); QStringList consumerParams = args.at(0).split(QLatin1Char(' '), QString::SkipEmptyParts);
#else
QStringList consumerParams = args.at(0).split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
args.removeFirst(); args.removeFirst();
QDir baseFolder(target); QDir baseFolder(target);
Mlt::Factory::init(); Mlt::Factory::init();
......
...@@ -206,7 +206,11 @@ void AssetParameterModel::internalSetParameter(const QString &name, const QStrin ...@@ -206,7 +206,11 @@ void AssetParameterModel::internalSetParameter(const QString &name, const QStrin
locale.setNumberOptions(QLocale::OmitGroupSeparator); 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 // 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 (data(paramIndex, AssetParameterModel::TypeRole).value<ParamType>() == ParamType::Curve) {
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList vals = paramValue.split(QLatin1Char(';'), QString::SkipEmptyParts); QStringList vals = paramValue.split(QLatin1Char(';'), QString::SkipEmptyParts);
#else
QStringList vals = paramValue.split(QLatin1Char(';'), Qt::SkipEmptyParts);
#endif
int points = vals.size(); int points = vals.size();
m_asset->set("3", points / 10.); m_asset->set("3", points / 10.);
m_params[QStringLiteral("3")].value = points / 10.; m_params[QStringLiteral("3")].value = points / 10.;
......
...@@ -44,8 +44,16 @@ ButtonParamWidget::ButtonParamWidget(std::shared_ptr<AssetParameterModel> model, ...@@ -44,8 +44,16 @@ ButtonParamWidget::ButtonParamWidget(std::shared_ptr<AssetParameterModel> model,
//setEnabled(m_model->getOwnerId().first != ObjectType::TimelineTrack); //setEnabled(m_model->getOwnerId().first != ObjectType::TimelineTrack);
auto *layout = new QVBoxLayout(this); auto *layout = new QVBoxLayout(this);
QVariantList filterData = m_model->data(m_index, AssetParameterModel::FilterJobParamsRole).toList(); 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); 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); 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; QString conditionalInfo;
for (const QVariant jobElement : filterData) { for (const QVariant jobElement : filterData) {
......
...@@ -150,7 +150,11 @@ void KeyframeEdit::addParameter(QModelIndex index, int activeKeyframe) ...@@ -150,7 +150,11 @@ void KeyframeEdit::addParameter(QModelIndex index, int activeKeyframe)
QStringList frames; QStringList frames;
/*if (e.hasAttribute(QStringLiteral("keyframes"))) { /*if (e.hasAttribute(QStringLiteral("keyframes"))) {
// Effects have keyframes in a "keyframe" attribute, not sure why // 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); frames = e.attribute(QStringLiteral("keyframes")).split(QLatin1Char(';'), QString::SkipEmptyParts);
#else
frames = e.attribute(QStringLiteral("keyframes")).split(QLatin1Char(';'), Qt::SkipEmptyParts);
#endif
m_keyframesTag = true; m_keyframesTag = true;
} else {*/ } else {*/
// Transitions take keyframes from the value param // Transitions take keyframes from the value param
...@@ -158,7 +162,11 @@ void KeyframeEdit::addParameter(QModelIndex index, int activeKeyframe) ...@@ -158,7 +162,11 @@ void KeyframeEdit::addParameter(QModelIndex index, int activeKeyframe)
if (!framesValue.contains(QLatin1Char('='))) { if (!framesValue.contains(QLatin1Char('='))) {
framesValue.prepend(QStringLiteral("0=")); framesValue.prepend(QStringLiteral("0="));
} }
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
frames = framesValue.split(QLatin1Char(';'), QString::SkipEmptyParts); frames = framesValue.split(QLatin1Char(';'), QString::SkipEmptyParts);
#else
frames = framesValue.split(QLatin1Char(';'), Qt::SkipEmptyParts);
#endif
m_keyframesTag = false; m_keyframesTag = false;
//} //}
for (int i = 0; i < frames.count(); ++i) { for (int i = 0; i < frames.count(); ++i) {
......
...@@ -3366,7 +3366,11 @@ void Bin::slotGotFilterJobResults(const QString &id, int startPos, int track, co ...@@ -3366,7 +3366,11 @@ void Bin::slotGotFilterJobResults(const QString &id, int startPos, int track, co
QString label = filterInfo.value(QStringLiteral("label")); QString label = filterInfo.value(QStringLiteral("label"));
QString key = filterInfo.value(QStringLiteral("key")); QString key = filterInfo.value(QStringLiteral("key"));
int offset = filterInfo.value(QStringLiteral("offset")).toInt(); 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); 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; // qCDebug(KDENLIVE_LOG)<<"// RESULT; "<<key<<" = "<<value;
if (filterInfo.contains(QStringLiteral("resultmessage"))) { if (filterInfo.contains(QStringLiteral("resultmessage"))) {
QString mess = filterInfo.value(QStringLiteral("resultmessage")); QString mess = filterInfo.value(QStringLiteral("resultmessage"));
......
...@@ -366,7 +366,11 @@ bool MltDeviceCapture::slotStartCapture(const QString &params, const QString &pa ...@@ -366,7 +366,11 @@ bool MltDeviceCapture::slotStartCapture(const QString &params, 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 // 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. // and going into and endless loop.
renderProps->set("mlt_profile", m_activeProfile.toUtf8().constData()); renderProps->set("mlt_profile", m_activeProfile.toUtf8().constData());
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList paramList = params.split(' ', QString::SkipEmptyParts); const QStringList paramList = params.split(' ', QString::SkipEmptyParts);
#else
const QStringList paramList = params.split(' ', Qt::SkipEmptyParts);
#endif
for (int i = 0; i < paramList.count(); ++i) { for (int i = 0; i < paramList.count(); ++i) {
tmp = qstrdup(paramList.at(i).section(QLatin1Char('='), 0, 0).toUtf8().constData()); tmp = qstrdup(paramList.at(i).section(QLatin1Char('='), 0, 0).toUtf8().constData());
QString value = paramList.at(i).section(QLatin1Char('='), 1, 1); QString value = paramList.at(i).section(QLatin1Char('='), 1, 1);
......
...@@ -90,7 +90,11 @@ QStringList ClipCreationDialog::getExtensions() ...@@ -90,7 +90,11 @@ QStringList ClipCreationDialog::getExtensions()
} }
} }
// process custom user extensions // process custom user extensions
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList customs = KdenliveSettings::addedExtensions().split(' ', QString::SkipEmptyParts); const QStringList customs = KdenliveSettings::addedExtensions().split(' ', QString::SkipEmptyParts);
#else
const QStringList customs = KdenliveSettings::addedExtensions().split(' ', Qt::SkipEmptyParts);
#endif
if (!customs.isEmpty()) { if (!customs.isEmpty()) {
for (const QString &ext : customs) { for (const QString &ext : customs) {
if (ext.startsWith(QLatin1String("*."))) { if (ext.startsWith(QLatin1String("*."))) {
......
...@@ -1269,17 +1269,29 @@ void KdenliveSettingsDialog::slotUpdatev4lDevice() ...@@ -1269,17 +1269,29 @@ void KdenliveSettingsDialog::slotUpdatev4lDevice()
m_configCapture.kcfg_v4l_format->addItem(i18n("Current settings")); m_configCapture.kcfg_v4l_format->addItem(i18n("Current settings"));
} }
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList pixelformats = info.split('>', QString::SkipEmptyParts); QStringList pixelformats = info.split('>', QString::SkipEmptyParts);
#else
QStringList pixelformats = info.split('>', Qt::SkipEmptyParts);
#endif
QString itemSize; QString itemSize;
QString pixelFormat; QString pixelFormat;
QStringList itemRates; QStringList itemRates;
for (int i = 0; i < pixelformats.count(); ++i) { for (int i = 0; i < pixelformats.count(); ++i) {
QString format = pixelformats.at(i).section(QLatin1Char(':'), 0, 0); 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); QStringList sizes = pixelformats.at(i).split(':', QString::SkipEmptyParts);
#else
QStringList sizes = pixelformats.at(i).split(':', Qt::SkipEmptyParts);
#endif
pixelFormat = sizes.takeFirst(); pixelFormat = sizes.takeFirst();
for (int j = 0; j < sizes.count(); ++j) { for (int j = 0; j < sizes.count(); ++j) {
itemSize = sizes.at(j).section(QLatin1Char('='), 0, 0); 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); 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) { for (int k = 0; k < itemRates.count(); ++k) {
m_configCapture.kcfg_v4l_format->addItem( m_configCapture.kcfg_v4l_format->addItem(
QLatin1Char('[') + format + QStringLiteral("] ") + itemSize + QStringLiteral(" (") + itemRates.at(k) + QLatin1Char(')'), QLatin1Char('[') + format + QStringLiteral("] ") + itemSize + QStringLiteral(" (") + itemRates.at(k) + QLatin1Char(')'),
......
...@@ -553,7 +553,11 @@ void RenderWidget::slotSaveProfile() ...@@ -553,7 +553,11 @@ void RenderWidget::slotSaveProfile()
ui.setupUi(d); ui.setupUi(d);
QString customGroup; QString customGroup;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList arguments = m_view.advanced_params->toPlainText().split(' ', QString::SkipEmptyParts); 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()) { if (!arguments.isEmpty()) {
ui.parameters->setText(arguments.join(QLatin1Char(' '))); ui.parameters->setText(arguments.join(QLatin1Char(' ')));
} }
...@@ -2304,17 +2308,37 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable) ...@@ -2304,17 +2308,37 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable)
childitem->setData(0, StandardRole, standard); childitem->setData(0, StandardRole, standard);
childitem->setData(0, ParamsRole, params); childitem->setData(0, ParamsRole, params);
if (params.contains(QLatin1String("%quality"))) { 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)); 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"))) { } 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)); 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 (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)); 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"))) { } 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)); 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 (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)); 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"))) { if (profile.hasAttribute(QStringLiteral("url"))) {
childitem->setData(0, ExtraRole, profile.attribute(QStringLiteral("url"))); childitem->setData(0, ExtraRole, profile.attribute(QStringLiteral("url")));
...@@ -2393,18 +2417,38 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable) ...@@ -2393,18 +2417,38 @@ void RenderWidget::parseFile(const QString &exportFile, bool editable)
item->setData(0, StandardRole, standard); item->setData(0, StandardRole, standard);
item->setData(0, ParamsRole, params); item->setData(0, ParamsRole, params);
if (params.contains(QLatin1String("%quality"))) { 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)); 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"))) { } 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)); 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"))) { if (params.contains(QLatin1String("%audioquality"))) {
item->setData(0, AudioBitratesRole, item->setData(0, AudioBitratesRole,
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
profileElement.attribute(QStringLiteral("audioqualities")).split(QLatin1Char(','), QString::SkipEmptyParts)); profileElement.attribute(QStringLiteral("audioqualities")).split(QLatin1Char(','), QString::SkipEmptyParts));
#else
profileElement.attribute(QStringLiteral("audioqualities")).split(QLatin1Char(','), Qt::SkipEmptyParts));
#endif
} else if (params.contains(QLatin1String("%audiobitrate"))) { } 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)); 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 (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)); 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"))) { if (profileElement.hasAttribute(QStringLiteral("url"))) {
item->setData(0, ExtraRole, profileElement.attribute(QStringLiteral("url"))); item->setData(0, ExtraRole, profileElement.attribute(QStringLiteral("url")));
......
...@@ -332,17 +332,29 @@ void Wizard::slotUpdateCaptureParameters() ...@@ -332,17 +332,29 @@ void Wizard::slotUpdateCaptureParameters()
<< QString::number(profileInfo->height()) << QString::number(profileInfo->frame_rate_num()) << QString::number(profileInfo->height()) << QString::number(profileInfo->frame_rate_num())
<< QString::number(profileInfo->frame_rate_den())); << QString::number(profileInfo->frame_rate_den()));
} }
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList pixelformats = formats.split('>', QString::SkipEmptyParts); QStringList pixelformats = formats.split('>', QString::SkipEmptyParts);
#else
QStringList pixelformats = formats.split('>', Qt::SkipEmptyParts);
#endif
QString itemSize; QString itemSize;
QString pixelFormat; QString pixelFormat;
QStringList itemRates; QStringList itemRates;
for (int i = 0; i < pixelformats.count(); ++i) { for (int i = 0; i < pixelformats.count(); ++i) {
QString format = pixelformats.at(i).section(QLatin1Char(':'), 0, 0); 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); QStringList sizes = pixelformats.at(i).split(':', QString::SkipEmptyParts);
#else
QStringList sizes = pixelformats.at(i).split(':', Qt::SkipEmptyParts);
#endif
pixelFormat = sizes.takeFirst(); pixelFormat = sizes.takeFirst();
for (int j = 0; j < sizes.count(); ++j) { for (int j = 0; j < sizes.count(); ++j) {
itemSize = sizes.at(j).section(QLatin1Char('='), 0, 0); 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); 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) { for (int k = 0; k < itemRates.count(); ++k) {
QString formatDescription = QString formatDescription =
QLatin1Char('[') + format + QStringLiteral("] ") + itemSize + QStringLiteral(" (") + itemRates.at(k) + QLatin1Char(')'); QLatin1Char('[') + format + QStringLiteral("] ") + itemSize + QStringLiteral(" (") + itemRates.at(k) + QLatin1Char(')');
......
...@@ -63,7 +63,11 @@ std::shared_ptr<EffectTreeModel> EffectTreeModel::construct(const QString &categ ...@@ -63,7 +63,11 @@ std::shared_ptr<EffectTreeModel> EffectTreeModel::construct(const QString &categ
if (!KdenliveSettings::gpu_accel() && groupName == i18n("GPU effects")) { if (!KdenliveSettings::gpu_accel() && groupName == i18n("GPU effects")) {
continue; continue;
} }
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList list = groups.at(i).toElement().attribute(QStringLiteral("list")).split(QLatin1Char(','), QString::SkipEmptyParts); 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")}); auto groupItem = self->rootItem->appendChild(QList<QVariant>{groupName, QStringLiteral("root")});
for (const QString &effect : list) { for (const QString &effect : list) {
effectCategory[effect] = groupItem; effectCategory[effect] = groupItem;
......
...@@ -751,7 +751,11 @@ void CollapsibleEffectView::importKeyframes(const QString &kf) ...@@ -751,7 +751,11 @@ void CollapsibleEffectView::importKeyframes(const QString &kf)
{ {
QMap<QString, QString> keyframes; QMap<QString, QString> keyframes;
if (kf.contains(QLatin1Char('\n'))) { if (kf.contains(QLatin1Char('\n'))) {
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList params = kf.split(QLatin1Char('\n'), QString::SkipEmptyParts); 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) { for (const QString &param : params) {
keyframes.insert(param.section(QLatin1Char('='), 0, 0), param.section(QLatin1Char('='), 1)); keyframes.insert(param.section(QLatin1Char('='), 0, 0), param.section(QLatin1Char('='), 1));
} }
......
...@@ -104,7 +104,11 @@ int CutClipJob::prepareJob(const std::shared_ptr<JobManager> &ptr, const std::ve ...@@ -104,7 +104,11 @@ int CutClipJob::prepareJob(const std::shared_ptr<JobManager> &ptr, const std::ve
return -1; return -1;
} }
path = ui.file_url->url().toLocalFile(); 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); 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()); KdenliveSettings::setAdd_new_clip(ui.add_clip->isChecked());
delete d; delete d;
......
...@@ -100,7 +100,11 @@ bool ProxyJob::startJob() ...@@ -100,7 +100,11 @@ bool ProxyJob::startJob()
parameter.prepend(QStringLiteral("-pix_fmt yuv420p")); parameter.prepend(QStringLiteral("-pix_fmt yuv420p"));
} }
} }
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList params = parameter.split(QLatin1Char('-'), QString::SkipEmptyParts); QStringList params = parameter.split(QLatin1Char('-'), QString::SkipEmptyParts);
#else
QStringList params = parameter.split(QLatin1Char('-'), Qt::SkipEmptyParts);
#endif
double display_ratio; double display_ratio;
if (source.startsWith(QLatin1String("consumer:"))) { if (source.startsWith(QLatin1String("consumer:"))) {
display_ratio = KdenliveDoc::getDisplayRatio(source.section(QLatin1Char(':'), 1)); display_ratio = KdenliveDoc::getDisplayRatio(source.section(QLatin1Char(':'), 1));
...@@ -270,7 +274,11 @@ bool ProxyJob::startJob() ...@@ -270,7 +274,11 @@ bool ProxyJob::startJob()
parameters << QStringLiteral("-i") << source; parameters << QStringLiteral("-i") << source;
} }
QString params = proxyParams; QString params = proxyParams;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
for (const QString &s : params.split(QLatin1Char(' '), QString::SkipEmptyParts)) { for (const QString &s : params.split(QLatin1Char(' '), QString::SkipEmptyParts)) {
#else
for (const QString &s : params.split(QLatin1Char(' '), Qt::SkipEmptyParts)) {
#endif
QString t = s.simplified(); QString t = s.simplified();
if (t != QLatin1String("-noautorotate")) { if (t != QLatin1String("-noautorotate")) {
parameters << t; parameters << t;
......
...@@ -84,7 +84,11 @@ bool TranscodeJob::startJob() ...@@ -84,7 +84,11 @@ bool TranscodeJob::startJob()
// insert transcoded filename // insert transcoded filename
m_transcodeParams.replace(QStringLiteral("%1"), QString("-consumer %1")); m_transcodeParams.replace(QStringLiteral("%1"), QString("-consumer %1"));
// Convert param style // Convert param style
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList params = m_transcodeParams.split(QLatin1Char('-'), QString::SkipEmptyParts); QStringList params = m_transcodeParams.split(QLatin1Char('-'), QString::SkipEmptyParts);
#else
QStringList params = m_transcodeParams.split(QLatin1Char('-'), Qt::SkipEmptyParts);
#endif
QStringList mltParameters; QStringList mltParameters;
for (const QString &s : params) { for (const QString &s : params) {
QString t = s.simplified(); QString t = s.simplified();
......
...@@ -271,7 +271,11 @@ int main(int argc, char *argv[]) ...@@ -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); QStringList progArgs = QString(*argv).split(QLatin1Char(' '), QString::SkipEmptyParts);
#else
QStringList progArgs = QString(*argv).split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
// Remove app name // Remove app name
progArgs.takeFirst(); progArgs.takeFirst();
auto *restart = new QProcess; auto *restart = new QProcess;
......
...@@ -1033,7 +1033,11 @@ int GLWidget::reconfigureMulti(const QString &params, const QString &path, Mlt:: ...@@ -1033,7 +1033,11 @@ int GLWidget::reconfigureMulti(const QString &params, const QString &path, Mlt::
m_consumer->set("1.terminate_on_pause", 0); 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 // 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); QStringList paramList = params.split(' ', QString::SkipEmptyParts);
#else
QStringList paramList = params.split(' ', Qt::SkipEmptyParts);
#endif
for (int i = 0; i < paramList.count(); ++i) { for (int i = 0; i < paramList.count(); ++i) {
QString key = "1." + paramList.at(i).section(QLatin1Char('='), 0, 0); QString key = "1." + paramList.at(i).section(QLatin1Char('='), 0, 0);
QString value = paramList.at(i).section(QLatin1Char('='), 1, 1); QString value = paramList.at(i).section(QLatin1Char('='), 1, 1);
......
...@@ -176,7 +176,11 @@ void ClipTranscode::slotStartTransCode() ...@@ -176,7 +176,11 @@ void ClipTranscode::slotStartTransCode()
if (mltEncoding) { if (mltEncoding) {
params.replace(QStringLiteral("%1"), QString("-consumer %1")); params.replace(QStringLiteral("%1"), QString("-consumer %1"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList splitted = params.split(QLatin1Char('-'), QString::SkipEmptyParts); const QStringList splitted = params.split(QLatin1Char('-'), QString::SkipEmptyParts);
#else
const QStringList splitted = params.split(QLatin1Char('-'), Qt::SkipEmptyParts);
#endif
for (const QString &s : splitted) { for (const QString &s : splitted) {
QString t = s.simplified(); QString t = s.simplified();
if (t.count(QLatin1Char(' ')) == 0) { if (t.count(QLatin1Char(' ')) == 0) {
......
...@@ -266,11 +266,19 @@ bool PreviewManager::loadParams() ...@@ -266,11 +266,19 @@ bool PreviewManager::loadParams()
{ {
KdenliveDoc *doc = pCore->currentDoc(); KdenliveDoc *doc = pCore->currentDoc();
m_extension = doc->getDocumentProperty(QStringLiteral("previewextension")); 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); m_consumerParams = doc->getDocumentProperty(QStringLiteral("previewparameters")).split(QLatin1Char(' '), QString::SkipEmptyParts);