Commit 042fd1a3 authored by Vincent Pinon's avatar Vincent Pinon
Browse files

Merge branch 'Applications/18.08'

parents edae3ef8 169648d1
......@@ -135,6 +135,8 @@ if (KF5DocTools_FOUND)
endif()
install( FILES kdenlive.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
include(GNUInstallDirs)
install( FILES AUTHORS COPYING README DESTINATION ${CMAKE_INSTALL_DOCDIR})
configure_file(config-kdenlive.h.cmake config-kdenlive.h @ONLY)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -254,13 +254,24 @@
</ul>
</description>
<releases>
<release date="2018-09-06" version="18.08.1"/>
<release date="2018-10-11" version="18.08.2"/>
</releases>
<url type="homepage">https://kdenlive.org/</url>
<url type="bugtracker">https://bugs.kde.org</url>
<url type="help">https://userbase.kde.org/Kdenlive/Manual</url>
<screenshots>
<screenshot type="source">
<caption>Kdenlive 18.08</caption>
<caption xml:lang="ca">Kdenlive 18.08</caption>
<caption xml:lang="ca-valencia">Kdenlive 18.08</caption>
<caption xml:lang="de">Kdenlive 18.08</caption>
<caption xml:lang="es">Kdenlive 18.08</caption>
<caption xml:lang="nl">Kdenlive 18.08</caption>
<caption xml:lang="pl">Kdenlive 18.08</caption>
<caption xml:lang="pt">Kdenlive 18.08</caption>
<caption xml:lang="sv">Kdenlive 18.08</caption>
<caption xml:lang="uk">Kdenlive 18.08</caption>
<caption xml:lang="x-test">xxKdenlive 18.08xx</caption>
<image>https://cdn.kde.org/screenshots/kdenlive/screenshot-monitors.png</image>
</screenshot>
</screenshots>
......
......@@ -310,7 +310,18 @@ class BinItemDelegate: public QStyledItemDelegate
{
public:
explicit BinItemDelegate(QObject *parent = nullptr): QStyledItemDelegate(parent)
, m_editorOpen(false)
{
connect(this, &QStyledItemDelegate::closeEditor, [&]() {
m_editorOpen = false;
});
}
void setEditorData(QWidget *w, const QModelIndex &i) const override
{
if (!m_editorOpen) {
QStyledItemDelegate::setEditorData(w, i);
m_editorOpen = true;
}
}
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
......@@ -488,6 +499,8 @@ public:
QStyledItemDelegate::paint(painter, option, index);
}
}
private:
mutable bool m_editorOpen;
};
LineEventEater::LineEventEater(QObject *parent) : QObject(parent)
......
......@@ -62,6 +62,16 @@ DocumentChecker::DocumentChecker(const QUrl &url, const QDomDocument &doc):
{
}
QMap <QString, QString> DocumentChecker::getLumaPairs() const
{
QMap <QString, QString> lumaSearchPairs;
lumaSearchPairs.insert(QStringLiteral("luma"), QStringLiteral("resource"));
lumaSearchPairs.insert(QStringLiteral("movit.luma_mix"), QStringLiteral("resource"));
lumaSearchPairs.insert(QStringLiteral("composite"), QStringLiteral("luma"));
lumaSearchPairs.insert(QStringLiteral("region"), QStringLiteral("composite.luma"));
return lumaSearchPairs;
}
bool DocumentChecker::hasErrorInClips()
{
int max;
......@@ -220,16 +230,16 @@ bool DocumentChecker::hasErrorInClips()
QStringList missingLumas;
QStringList filesToCheck;
QString filePath;
QMap <QString, QString>lumaSearchPairs = getLumaPairs();
QDomNodeList trans = m_doc.elementsByTagName(QStringLiteral("transition"));
max = trans.count();
for (int i = 0; i < max; ++i) {
QDomElement transition = trans.at(i).toElement();
QString service = getProperty(transition, QStringLiteral("mlt_service"));
QString luma;
if (service == QLatin1String("luma")) {
luma = getProperty(transition, QStringLiteral("resource"));
} else if (service == QLatin1String("composite")) {
luma = getProperty(transition, QStringLiteral("luma"));
if (lumaSearchPairs.contains(service)) {
luma = getProperty(transition, lumaSearchPairs.value(service));
}
if (!luma.isEmpty() && !filesToCheck.contains(luma)) {
filesToCheck.append(luma);
......@@ -286,13 +296,11 @@ bool DocumentChecker::hasErrorInClips()
QDomElement transition = trans.at(i).toElement();
QString service = getProperty(transition, QStringLiteral("mlt_service"));
QString luma;
if (service == QLatin1String("luma")) {
luma = getProperty(transition, QStringLiteral("resource"));
} else if (service == QLatin1String("composite")) {
luma = getProperty(transition, QStringLiteral("luma"));
if (lumaSearchPairs.contains(service)) {
luma = getProperty(transition, lumaSearchPairs.value(service));
}
if (!luma.isEmpty() && autoFixLuma.contains(luma)) {
setProperty(transition, service == QLatin1String("luma") ? QStringLiteral("resource") : QStringLiteral("luma"), autoFixLuma.value(luma));
setProperty(transition, lumaSearchPairs.value(service), autoFixLuma.value(luma));
}
}
}
......@@ -931,30 +939,27 @@ void DocumentChecker::fixClipItem(QTreeWidgetItem *child, const QDomNodeList &pr
}
}*/
} else if (child->data(0, statusRole).toInt() == LUMAOK) {
QMap <QString, QString>lumaSearchPairs = getLumaPairs();
for (int i = 0; i < trans.count(); ++i) {
QString service = getProperty(trans.at(i).toElement(), QStringLiteral("mlt_service"));
QString luma;
if (service == QLatin1String("luma")) {
luma = getProperty(trans.at(i).toElement(), QStringLiteral("resource"));
} else if (service == QLatin1String("composite")) {
luma = getProperty(trans.at(i).toElement(), QStringLiteral("luma"));
if (lumaSearchPairs.contains(service)) {
luma = getProperty(trans.at(i).toElement(), lumaSearchPairs.value(service));
}
if (!luma.isEmpty() && luma == child->data(0, idRole).toString()) {
setProperty(trans.at(i).toElement(), service == QLatin1String("luma") ? QStringLiteral("resource") : QStringLiteral("luma"), child->text(1));
//qCDebug(KDENLIVE_LOG) << "replace with; " << child->text(1);
setProperty(trans.at(i).toElement(), lumaSearchPairs.value(service), child->text(1));
}
}
} else if (child->data(0, statusRole).toInt() == LUMAMISSING) {
QMap <QString, QString>lumaSearchPairs = getLumaPairs();
for (int i = 0; i < trans.count(); ++i) {
QString service = getProperty(trans.at(i).toElement(), QStringLiteral("mlt_service"));
QString luma;
if (service == QLatin1String("luma")) {
luma = getProperty(trans.at(i).toElement(), QStringLiteral("resource"));
} else if (service == QLatin1String("composite")) {
luma = getProperty(trans.at(i).toElement(), QStringLiteral("luma"));
if (lumaSearchPairs.contains(service)) {
luma = getProperty(trans.at(i).toElement(), lumaSearchPairs.value(service));
}
if (!luma.isEmpty() && luma == child->data(0, idRole).toString()) {
setProperty(trans.at(i).toElement(), service == QLatin1String("luma") ? QStringLiteral("resource") : QStringLiteral("luma"), QString());
setProperty(trans.at(i).toElement(), lumaSearchPairs.value(service), QString());
}
}
}
......@@ -1018,18 +1023,17 @@ void DocumentChecker::slotDeleteSelected()
if (!deletedLumas.isEmpty()) {
QDomElement e;
QDomNodeList transitions = m_doc.elementsByTagName(QStringLiteral("transition"));
QMap <QString, QString>lumaSearchPairs = getLumaPairs();
foreach (const QString &lumaPath, deletedLumas) {
for (int i = 0; i < transitions.count(); ++i) {
e = transitions.item(i).toElement();
QString service = EffectsList::property(e, QStringLiteral("mlt_service"));
QString resource;
if (service == QLatin1String("luma")) {
resource = EffectsList::property(e, QStringLiteral("resource"));
} else if (service == QLatin1String("composite")) {
resource = EffectsList::property(e, QStringLiteral("luma"));
if (lumaSearchPairs.contains(service)) {
resource = getProperty(e, lumaSearchPairs.value(service));
}
if (resource == lumaPath) {
EffectsList::removeProperty(e, service == QLatin1String("luma") ? QStringLiteral("resource") : QStringLiteral("luma"));
if (!resource.isEmpty() && resource == lumaPath) {
EffectsList::removeProperty(e, lumaSearchPairs.value(service));
}
}
}
......
......@@ -76,6 +76,8 @@ private:
void fixClipItem(QTreeWidgetItem *child, const QDomNodeList &producers, const QDomNodeList &trans);
void fixSourceClipItem(QTreeWidgetItem *child, const QDomNodeList &producers);
void fixProxyClip(const QString &id, const QString &oldUrl, const QString &newUrl, const QDomNodeList &producers);
/** @brief Returns list of transitions containg luma files */
QMap <QString, QString> getLumaPairs() const;
};
#endif
......
......@@ -2857,6 +2857,8 @@ void MainWindow::slotClipStart()
if (pCore->projectManager()->currentTimeline()) {
pCore->projectManager()->currentTimeline()->projectView()->clipStart();
}
} else {
m_clipMonitor->slotStart();
}
}
......@@ -2866,6 +2868,8 @@ void MainWindow::slotClipEnd()
if (pCore->projectManager()->currentTimeline()) {
pCore->projectManager()->currentTimeline()->projectView()->clipEnd();
}
} else {
m_clipMonitor->slotEnd();
}
}
......
Markdown is supported
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