]> git.sesse.net Git - kdenlive/blobdiff - src/wizard.cpp
Fix crash on app close
[kdenlive] / src / wizard.cpp
index 014d5358277cfe0e4631de6d9d2a8aec5419b29b..27286dbb591bc8a48881a3fb1e46f7cd47c4f098 100644 (file)
@@ -36,7 +36,7 @@ Wizard::Wizard(QWidget *parent): QWizard(parent) {
     setPixmap(QWizard::WatermarkPixmap, QPixmap(KStandardDirs::locate("appdata", "banner.png")));
 
     QWizardPage *page1 = new QWizardPage;
-    page1->setTitle("Welcome");
+    page1->setTitle(i18n("Welcome"));
     QLabel *label = new QLabel(i18n("This is the first time you run Kdenlive. This wizard will let you adjust some basic settings, you will be ready to edit your first movie in a few seconds..."));
     label->setWordWrap(true);
     m_startLayout = new QVBoxLayout;
@@ -198,16 +198,27 @@ void Wizard::slotCheckMlt() {
     QProcess checkProcess;
     checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "producer");
     if (!checkProcess.waitForStarted())
-        errorMessage.append("Error starting MLT's command line player (inigo).\n");
+        errorMessage.append(i18n("Error starting MLT's command line player (inigo)") + ".\n");
 
     checkProcess.waitForFinished();
 
     QByteArray result = checkProcess.readAllStandardError();
-    if (!result.contains("avformat")) errorMessage.append(i18n("MLT's avformat (FFMPEG) module not found. Please check your FFMPEG and MLT install. Kdenlive will not work until this issue is fixed.\n"));
+    if (!result.contains("- avformat")) errorMessage.append(i18n("MLT's avformat (FFMPEG) module not found. Please check your FFMPEG and MLT install. Kdenlive will not work until this issue is fixed.") + "\n");
+
+    QProcess checkProcess2;
+    checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "consumer");
+    if (!checkProcess2.waitForStarted())
+        errorMessage.append(i18n("Error starting MLT's command line player (inigo).") + "\n");
+
+    checkProcess2.waitForFinished();
+
+    result = checkProcess2.readAllStandardError();
+    if (!result.contains("sdl") || !result.contains("sdl_preview")) errorMessage.append(i18n("MLT's SDL module not found. Please check your MLT install. Kdenlive will not work until this issue is fixed.") + "\n");
 
     if (!errorMessage.isEmpty()) {
+        errorMessage.prepend(QString("<b>%1</b><br>").arg(i18n("Fatal Error")));
         QLabel *pix = new QLabel();
-        pix->setPixmap(KIcon("process-stop").pixmap(30));
+        pix->setPixmap(KIcon("dialog-error").pixmap(30));
         QLabel *label = new QLabel(errorMessage);
         label->setWordWrap(true);
         m_startLayout->addSpacing(40);