From kde-commits Tue Feb 28 23:03:40 2017 From: Vincent Pinon Date: Tue, 28 Feb 2017 23:03:40 +0000 To: kde-commits Subject: [kdenlive] src/doc: Fix document checker font replacement Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=148832303110520 Git commit 6bae786fa8be4a14b8ac43df4ab1220b08d6392c by Vincent Pinon. Committed on 28/02/2017 at 22:30. Pushed by vpinon into branch 'master'. Fix document checker font replacement M +4 -5 src/doc/documentchecker.cpp https://commits.kde.org/kdenlive/6bae786fa8be4a14b8ac43df4ab1220b08d6392c diff --git a/src/doc/documentchecker.cpp b/src/doc/documentchecker.cpp index 32a4e78f3..667054d0f 100644 --- a/src/doc/documentchecker.cpp +++ b/src/doc/documentchecker.cpp @@ -308,7 +308,7 @@ bool DocumentChecker::hasErrorInClips() ClipType type; int status =3D CLIPMISSING; const QString service =3D EffectsList::property(e, QStringLiteral("mlt_se= rvice")); - QString resource =3D service =3D=3D QLatin1String("timewarp") ? Ef= fectsList::property(e, QStringLiteral("warp_resource")) : EffectsList::prop= erty(e, QStringLiteral("resource")); + resource =3D service =3D=3D QLatin1String("timewarp") ? EffectsLis= t::property(e, QStringLiteral("warp_resource")) : EffectsList::property(e, = QStringLiteral("resource")); bool slideshow =3D resource.contains(QStringLiteral("/.all.")) || = resource.contains(QStringLiteral("?")) || resource.contains(QStringLiteral(= "%")); if (service =3D=3D QLatin1String("avformat") || service =3D=3D QLatin1Str= ing("avformat-novalidate") || service =3D=3D QLatin1String("framebuffer") |= | service =3D=3D QLatin1String("timewarp")) { clipType =3D i18n("Video clip"); @@ -381,9 +381,8 @@ bool DocumentChecker::hasErrorInClips() item->setData(0, statusRole, CLIPPLACEHOLDER); item->setIcon(0, KoIconUtils::themedIcon(QStringLiteral("dialog-wa= rning"))); item->setToolTip(1, e.attribute(QStringLiteral("name"))); - QString ft =3D e.attribute(QStringLiteral("resource")); - QString newft =3D QFontInfo(QFont(ft)).family(); - item->setText(1, i18n("%1 will be replaced by %2", ft, newft)); + QString newft =3D QFontInfo(QFont(font)).family(); + item->setText(1, i18n("%1 will be replaced by %2", font, newft)); item->setData(0, typeRole, CLIPMISSING); } = @@ -443,7 +442,7 @@ bool DocumentChecker::hasErrorInClips() if (parentId =3D=3D id) { // Hit, we must replace url QString suffix; - QString resource =3D EffectsList::property(mltProd, QStrin= gLiteral("resource")); + resource =3D EffectsList::property(mltProd, QStringLiteral= ("resource")); if (slowmotion) { suffix =3D QLatin1Char('?') + resource.section(QLatin1= Char('?'), -1); }