Commit 5cbc6403 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Don't hardcode default track compositing (get ready for qtblend v3)

parent 0c4cbe17
Pipeline #224538 passed with stage
in 14 minutes and 45 seconds
......@@ -236,8 +236,12 @@ void KdenliveSettingsDialog::initMiscPage()
m_configMisc.kcfg_subtitle_duration->setInputMask(pCore->timecode().mask());
m_configMisc.kcfg_subtitle_duration->setValidator(validator);
m_configMisc.preferredcomposite->clear();
m_configMisc.preferredcomposite->addItem(i18n("auto"));
m_configMisc.preferredcomposite->addItems(KdenliveSettings::compositingList());
if (!KdenliveSettings::preferredcomposite().isEmpty()) {
int ix = m_configMisc.preferredcomposite->findData(KdenliveSettings::preferredcomposite());
int ix = m_configMisc.preferredcomposite->findText(KdenliveSettings::preferredcomposite());
if (ix > -1) {
m_configMisc.preferredcomposite->setCurrentIndex(ix);
}
......
......@@ -507,6 +507,10 @@
<label>The preferred composition for track compositing.</label>
<default></default>
</entry>
<entry name="compositingList" type="StringList">
<label>The allowed compositions for track compositing (sorted by preference).</label>
<default>frei0r.cairoblend,qtblend</default>
</entry>
</group>
<group name="env">
......
......@@ -1934,6 +1934,11 @@ bool MainWindow::readOptions()
}
delete w;
}
if (firstRun) {
if (TransitionsRepository::get()->getVersion(QStringLiteral("qtblend")) > 200) {
KdenliveSettings::setPreferredcomposite(QStringLiteral("qtblend"));
}
}
initialGroup.writeEntry("version", version);
return firstRun;
}
......
......@@ -174,14 +174,13 @@ const QString TransitionsRepository::getCompositingTransition()
if (KdenliveSettings::preferredcomposite() != i18n("auto") && exists(KdenliveSettings::preferredcomposite())) {
return KdenliveSettings::preferredcomposite();
}
if (exists(QStringLiteral("frei0r.cairoblend"))) {
return QStringLiteral("frei0r.cairoblend");
}
if (exists(QStringLiteral("qtblend"))) {
return QStringLiteral("qtblend");
}
if (exists(QStringLiteral("composite"))) {
return QStringLiteral("composite");
QStringList trackComposites = KdenliveSettings::compositingList();
while (!trackComposites.isEmpty()) {
const QString &cmp = trackComposites.takeFirst();
if (exists(cmp)) {
qDebug() << ":::: USING TRACK COMPOSITING: " << cmp;
return cmp;
}
}
qWarning() << "no compositing found";
return QString();
......
......@@ -242,28 +242,7 @@
</widget>
</item>
<item row="10" column="1">
<widget class="QComboBox" name="preferredcomposite">
<item>
<property name="text">
<string>auto</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">qtblend</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">frei0r.cairoblend</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">composite</string>
</property>
</item>
</widget>
<widget class="QComboBox" name="preferredcomposite"/>
</item>
</layout>
</widget>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment