X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fwizard.cpp;h=7267e4bc9d5502104cd8d5278a6003cd446dd454;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=61a232b18374bc94c4b4af79edbafd6e0516c168;hpb=e0fa1332f109b6455207ea701da386b2fddddf09;p=kdenlive
diff --git a/src/wizard.cpp b/src/wizard.cpp
index 61a232b1..7267e4bc 100644
--- a/src/wizard.cpp
+++ b/src/wizard.cpp
@@ -360,7 +360,7 @@ void Wizard::checkMltComponents()
result << QString(formats.get(i));
m_mltCheck.formats_list->addItems(result);
KdenliveSettings::setSupportedformats(result);
- checkMissingCodecs();
+ checkMissingCodecs();
delete consumer;
}
@@ -428,24 +428,24 @@ void Wizard::checkMissingCodecs()
QStringList requiredACodecs;
QStringList requiredVCodecs;
foreach(const QString &filename, fileList) {
- QDomDocument doc;
- QFile file(exportFolder + filename);
- doc.setContent(&file, false);
- file.close();
- QString std;
- QString format;
- QDomNodeList profiles = doc.elementsByTagName("profile");
- for (int i = 0; i < profiles.count(); ++i) {
- std = profiles.at(i).toElement().attribute("args");
- format.clear();
+ QDomDocument doc;
+ QFile file(exportFolder + filename);
+ doc.setContent(&file, false);
+ file.close();
+ QString std;
+ QString format;
+ QDomNodeList profiles = doc.elementsByTagName("profile");
+ for (int i = 0; i < profiles.count(); ++i) {
+ std = profiles.at(i).toElement().attribute("args");
+ format.clear();
if (std.startsWith("acodec=")) format = std.section("acodec=", 1, 1);
- else if (std.contains(" acodec=")) format = std.section(" acodec=", 1, 1);
+ else if (std.contains(" acodec=")) format = std.section(" acodec=", 1, 1);
if (!format.isEmpty()) requiredACodecs << format.section(' ', 0, 0).toLower();
- format.clear();
+ format.clear();
if (std.startsWith("vcodec=")) format = std.section("vcodec=", 1, 1);
- else if (std.contains(" vcodec=")) format = std.section(" vcodec=", 1, 1);
+ else if (std.contains(" vcodec=")) format = std.section(" vcodec=", 1, 1);
if (!format.isEmpty()) requiredVCodecs << format.section(' ', 0, 0).toLower();
- }
+ }
}
requiredACodecs.removeDuplicates();
requiredVCodecs.removeDuplicates();
@@ -453,38 +453,38 @@ void Wizard::checkMissingCodecs()
if (replaceLibfaacCodec) requiredACodecs.replaceInStrings("aac", "libfaac");
for (int i = 0; i < acodecsList.count(); ++i)
- requiredACodecs.removeAll(acodecsList.at(i));
+ requiredACodecs.removeAll(acodecsList.at(i));
for (int i = 0; i < vcodecsList.count(); ++i)
- requiredVCodecs.removeAll(vcodecsList.at(i));
+ requiredVCodecs.removeAll(vcodecsList.at(i));
if (!requiredACodecs.isEmpty() || !requiredVCodecs.isEmpty()) {
- QString missing = requiredACodecs.join(",");
- if (!missing.isEmpty() && !requiredVCodecs.isEmpty()) missing.append(',');
- missing.append(requiredVCodecs.join(","));
- missing.prepend(i18n("The following codecs were not found on your system. Check our online manual if you need them: "));
- // Some codecs required for rendering are not present on this system, warn user
- show();
+ QString missing = requiredACodecs.join(",");
+ if (!missing.isEmpty() && !requiredVCodecs.isEmpty()) missing.append(',');
+ missing.append(requiredVCodecs.join(","));
+ missing.prepend(i18n("The following codecs were not found on your system. Check our online manual if you need them: "));
+ // Some codecs required for rendering are not present on this system, warn user
+ show();
#if KDE_IS_VERSION(4,7,0)
KMessageWidget *infoMessage = new KMessageWidget(this);
m_startLayout->insertWidget(1, infoMessage);
infoMessage->setCloseButtonVisible(false);
infoMessage->setWordWrap(true);
- infoMessage->setMessageType(KMessageWidget::Warning);
+ infoMessage->setMessageType(KMessageWidget::Warning);
#if KDE_IS_VERSION(4,10,0)
- connect(infoMessage, SIGNAL(linkActivated(QString)), this, SLOT(slotOpenManual()));
- infoMessage->setText(missing);
+ connect(infoMessage, SIGNAL(linkActivated(QString)), this, SLOT(slotOpenManual()));
+ infoMessage->setText(missing);
#else
- // clickable text in kmessagewidget only available since KDE 4.10
- // remove link from text
- missing.remove(QRegExp("<[^>]*>"));
+ // clickable text in kmessagewidget only available since KDE 4.10
+ // remove link from text
+ missing.remove(QRegExp("<[^>]*>"));
infoMessage->setText(missing);
- QAction *manualAction = new QAction(i18n("Check online manual"), this);
- connect(manualAction, SIGNAL(triggered()), this, SLOT(slotOpenManual()));
- infoMessage->addAction(manualAction);
+ QAction *manualAction = new QAction(i18n("Check online manual"), this);
+ connect(manualAction, SIGNAL(triggered()), this, SLOT(slotOpenManual()));
+ infoMessage->addAction(manualAction);
#endif
infoMessage->animatedShow();
#else
- m_welcomeLabel->setText(m_welcomeLabel->text() + "