]> git.sesse.net Git - kdenlive/commitdiff
Fix compilation warnings
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 9 Aug 2009 16:31:31 +0000 (16:31 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 9 Aug 2009 16:31:31 +0000 (16:31 +0000)
svn path=/trunk/kdenlive/; revision=3806

13 files changed:
src/addeffectcommand.cpp
src/customtrackview.cpp
src/dvdwizard.cpp
src/dvdwizardchapters.cpp
src/dvdwizardmenu.cpp
src/dvdwizardvob.cpp
src/editeffectcommand.cpp
src/effectstackedit.cpp
src/kthumb.cpp
src/mainwindow.cpp
src/projectlist.cpp
src/renderer.cpp
src/wizard.cpp

index 1ee529744ea8011de31372ddc6a1a4396761baa4..2aa5b8e7ce197a8a8d2407b9189e47b904a18dd8 100644 (file)
@@ -32,7 +32,7 @@ AddEffectCommand::AddEffectCommand(CustomTrackView *view, const int track, GenTi
         m_doIt(doIt)
 {
     QString effectName;
-    QDomNode namenode = effect.elementsByTagName("name").item(0);
+    QDomNode namenode = m_effect.elementsByTagName("name").item(0);
     if (!namenode.isNull()) effectName = i18n(namenode.toElement().text().toUtf8().data());
     else effectName = i18n("effect");
     if (doIt) setText(i18n("Add %1", effectName));
index c0feaba30f02192f10daee1895cdf7f874579359..d3476517c1bbf9e333cb5b8a1204d0048add3e58 100644 (file)
@@ -401,9 +401,9 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event)
         AbstractClipItem *clip = static_cast <AbstractClipItem*>(item);
         if (m_tool == RAZORTOOL) {
             // razor tool over a clip, display current frame in monitor
-            if (/*!m_blockRefresh && */item->type() == AVWIDGET) {
+            if (false && /*!m_blockRefresh && */item->type() == AVWIDGET) {
                 //TODO: solve crash when showing frame when moving razor over clip
-               emit showClipFrame(((ClipItem *) item)->baseClip(), mappedXPos - (clip->startPos() - clip->cropStart()).frames(m_document->fps()));
+                emit showClipFrame(((ClipItem *) item)->baseClip(), mappedXPos - (clip->startPos() - clip->cropStart()).frames(m_document->fps()));
             }
             event->accept();
             return;
@@ -1169,7 +1169,10 @@ void CustomTrackView::dragEnterEvent(QDragEnterEvent * event)
         m_selectionGroup = new AbstractGroupItem(m_document->fps());
         QPoint pos;
         DocClipBase *clip = m_document->getBaseClip(list.at(0));
-        if (clip == NULL) kDebug() << " WARNING))))))))) CLIP NOT FOUND : " << list.at(0);
+        if (clip == NULL) {
+            kDebug() << " WARNING))))))))) CLIP NOT FOUND : " << list.at(0);
+            return;
+        }
         ItemInfo info;
         info.startPos = GenTime();
         info.cropStart = GenTime(list.at(1).toInt(), m_document->fps());
@@ -1197,7 +1200,10 @@ void CustomTrackView::dragEnterEvent(QDragEnterEvent * event)
         QList <GenTime> offsetList;
         for (int i = 0; i < ids.size(); ++i) {
             DocClipBase *clip = m_document->getBaseClip(ids.at(i));
-            if (clip == NULL) kDebug() << " WARNING))))))))) CLIP NOT FOUND : " << ids.at(i);
+            if (clip == NULL) {
+                kDebug() << " WARNING))))))))) CLIP NOT FOUND : " << ids.at(i);
+                return;
+            }
             ItemInfo info;
             info.startPos = start;
             info.endPos = info.startPos + clip->duration();
@@ -1514,11 +1520,10 @@ void CustomTrackView::moveEffect(int track, GenTime pos, int oldPos, int newPos)
         QDomElement before = clip->effectAt(oldPos - 1).cloneNode().toElement();
         clip->setEffectAt(oldPos - 1, act);
         clip->setEffectAt(newPos - 1, before);
-       m_document->renderer()->mltMoveEffect(track, pos, oldPos, newPos);
+        m_document->renderer()->mltMoveEffect(track, pos, oldPos, newPos);
         emit clipItemSelected(clip, newPos - 1);
-       setDocumentModified();
-    }
-    else emit displayMessage(i18n("Cannot move effect"), ErrorMessage);
+        setDocumentModified();
+    } else emit displayMessage(i18n("Cannot move effect"), ErrorMessage);
 }
 
 void CustomTrackView::slotChangeEffectState(ClipItem *clip, int effectPos, bool disable)
index 9b795f789f5fb04b5ce61e29ac14adc2548c546c..7ecbc93a0bb30436b6512312bf0481ccdc378a31 100644 (file)
@@ -67,9 +67,9 @@ DvdWizard::DvdWizard(const QString &url, const QString &profile, QWidget *parent
     page4->setTitle(i18n("Creating DVD Image"));
     m_status.setupUi(page4);
     m_status.error_box->setHidden(true);
-    m_status.tmp_folder->setPath(KdenliveSettings::currenttmpfolder());
+    m_status.tmp_folder->setUrl(KUrl(KdenliveSettings::currenttmpfolder()));
     m_status.tmp_folder->setMode(KFile::Directory | KFile::ExistingOnly);
-    m_status.iso_image->setPath(QDir::homePath() + "/untitled.iso");
+    m_status.iso_image->setUrl(KUrl(QDir::homePath() + "/untitled.iso"));
     m_status.iso_image->setFilter("*.iso");
     m_status.iso_image->setMode(KFile::File);
     m_status.iso_image->fileDialog()->setOperationMode(KFileDialog::Saving);
@@ -707,8 +707,8 @@ void DvdWizard::slotLoad()
     QString profile = dvdproject.attribute("profile");
     m_pageVob->setProfile(profile);
 
-    m_status.tmp_folder->setPath(dvdproject.attribute("tmp_folder"));
-    m_status.iso_image->setPath(dvdproject.attribute("iso_image"));
+    m_status.tmp_folder->setUrl(KUrl(dvdproject.attribute("tmp_folder")));
+    m_status.iso_image->setUrl(KUrl(dvdproject.attribute("iso_image")));
     m_pageVob->setIntroMovie(dvdproject.attribute("intro_movie"));
 
     QDomNodeList vobs = doc.elementsByTagName("vob");
index cf57dd103a1e02d550aa717ecfa1a33d1d0533b8..4460ab818661f2760e564762f92df777cbb807e9 100644 (file)
@@ -78,7 +78,7 @@ void DvdWizardChapters::slotUpdateChaptersList()
     m_view.chapters_list->clear();
     m_view.chapters_list->addItems(chaptersString);
 
-    bool modified = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 2).toInt();
+    //bool modified = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 2).toInt();
 }
 
 void DvdWizardChapters::slotAddChapter()
index 4ce830648a9fe3359815fcce1c87985cf05e513d..bb48547f7bbf5c8c1ab2026f35522847459bd8a3 100644 (file)
@@ -563,10 +563,10 @@ void DvdWizardMenu::loadXml(QDomElement xml)
         m_view.background_color->setColor(xml.attribute("background_color"));
     } else if (xml.hasAttribute("background_image")) {
         m_view.background_list->setCurrentIndex(1);
-        m_view.background_image->setPath(xml.attribute("background_image"));
+        m_view.background_image->setUrl(KUrl(xml.attribute("background_image")));
     } else if (xml.hasAttribute("background_video")) {
         m_view.background_list->setCurrentIndex(2);
-        m_view.background_image->setPath(xml.attribute("background_video"));
+        m_view.background_image->setUrl(KUrl(xml.attribute("background_video")));
     }
 
     m_view.text_color->setColor(xml.attribute("text_color"));
index ad1035b18bde9120d123b8f9b5c77d01c49ba878..b5ef75993252c3cf273997ae90d371fe50e70084 100644 (file)
@@ -287,7 +287,7 @@ QString DvdWizardVob::introMovie() const
 
 void DvdWizardVob::setIntroMovie(const QString path)
 {
-    m_view.intro_vob->setPath(path);
+    m_view.intro_vob->setUrl(KUrl(path));
     m_view.use_intro->setChecked(path.isEmpty() == false);
 }
 
index f829a2e952fbda775e71d7693662376de715bd60..a6e76c14dcbdd1d6b81d508bcd1ac014e40a8d39 100644 (file)
@@ -29,7 +29,7 @@ EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, Gen
         m_track(track),
         m_oldeffect(oldeffect),
         m_effect(effect),
-       m_pos(pos),
+        m_pos(pos),
         m_stackPos(stackPos),
         m_doIt(doIt)
 {
index 7aa6a4a48cae6b12ec73e10e5e3886e63e2774f1..31141b6cddeef2f168a516badba3305205182bf5 100644 (file)
@@ -424,7 +424,7 @@ void EffectStackEdit::collectAllParameters()
     const QDomElement oldparam = m_params.cloneNode().toElement();
     QDomElement newparam = oldparam.cloneNode().toElement();
     QDomNodeList namenode = newparam.elementsByTagName("parameter");
-    
+
     for (int i = 0; i < namenode.count() ; i++) {
         QDomNode pa = namenode.item(i);
         QDomNode na = pa.firstChildElement("name");
index faff1ab8fe1206d814c5d9502267b0c8dda14b72..1745b66eab3e4fc87e7930377980ad5cd4a0c1ce 100644 (file)
@@ -88,11 +88,10 @@ void MyThread::run()
         m_producer.seek(z);
         Mlt::Frame *mlt_frame = m_producer.get_frame();
         if (mlt_frame && mlt_frame->is_valid()) {
-            double m_framesPerSecond = mlt_producer_get_fps(m_producer.get_producer());   //mlt_frame->get_double( "fps" );
+            double m_framesPerSecond = mlt_producer_get_fps(m_producer.get_producer());
             int m_samples = mlt_sample_calculator(m_framesPerSecond, m_frequency, mlt_frame_get_position(mlt_frame->get_frame()));
             mlt_audio_format m_audioFormat = mlt_audio_pcm;
-
-                       qint16* m_pcm = static_cast<qint16*>( mlt_frame->get_audio(m_audioFormat, m_frequency, m_channels, m_samples));
+            qint16* m_pcm = static_cast<qint16*>(mlt_frame->get_audio(m_audioFormat, m_frequency, m_channels, m_samples));
 
             for (int c = 0; c < m_channels; c++) {
                 QByteArray m_array;
@@ -248,11 +247,16 @@ QPixmap KThumb::getFrame(Mlt::Producer *producer, int framepos, int width, int h
         return p;
     }
 
+    /*Mlt::Producer parentProd(producer->parent());
+    Mlt::Service service(parentProd.get_service());
+    mlt_service_lock(service.get_service());*/
+
     mlt_image_format format = mlt_image_rgb24a;
     int frame_width = width;
     int frame_height = height;
     uint8_t *data = frame->get_image(format, frame_width, frame_height, 0);
     QImage image((uchar *)data, frame_width, frame_height, QImage::Format_ARGB32);
+    //mlt_service_unlock(service.get_service());
 
     if (!image.isNull()) {
         p = QPixmap::fromImage(image.rgbSwapped());
index f63ab57f00a0eeecfbc35faeff8ecb78de4b2dae..24d444c350e0a7a491d2407f0a70be4b61884548 100644 (file)
@@ -838,11 +838,19 @@ void MainWindow::setupActions()
     collection->addAction("manage_profiles", profilesAction);
     connect(profilesAction, SIGNAL(triggered(bool)), this, SLOT(slotEditProfiles()));
 
+#if KDE_IS_VERSION(4,3,63)
+    KNS::standardAction(i18n("Download New Wipes..."), this, SLOT(slotGetNewLumaStuff()), actionCollection(), QString("get_new_lumas"));
+
+    KNS::standardAction(i18n("Download New Render Profiles..."), this, SLOT(slotGetNewRenderStuff()), actionCollection(), QString("get_new_profiles"));
+
+    KNS::standardAction(i18n("Download New Project Profiles..."), this, SLOT(slotGetNewMltProfileStuff()), actionCollection(), QString("get_new_mlt_profiles"));
+#else
     KNS::standardAction(i18n("Download New Wipes..."), this, SLOT(slotGetNewLumaStuff()), actionCollection(), "get_new_lumas");
 
     KNS::standardAction(i18n("Download New Render Profiles..."), this, SLOT(slotGetNewRenderStuff()), actionCollection(), "get_new_profiles");
 
     KNS::standardAction(i18n("Download New Project Profiles..."), this, SLOT(slotGetNewMltProfileStuff()), actionCollection(), "get_new_mlt_profiles");
+#endif
 
     KAction* wizAction = new KAction(KIcon("configure"), i18n("Run Config Wizard"), this);
     collection->addAction("run_wizard", wizAction);
@@ -1206,15 +1214,17 @@ void MainWindow::readOptions()
     KConfigGroup initialGroup(config, "version");
     bool upgrade = false;
     if (initialGroup.exists()) {
-        if (initialGroup.readEntry("version", QString()).section(' ', 0, 0) != QString(version).section(' ', 0, 0))
+        if (initialGroup.readEntry("version", QString()).section(' ', 0, 0) != QString(version).section(' ', 0, 0)) {
             upgrade = true;
+        }
 
         if (initialGroup.readEntry("version") == "0.7") {
             //Add new settings from 0.7.1
             if (KdenliveSettings::defaultprojectfolder().isEmpty()) {
                 QString path = QDir::homePath() + "/kdenlive";
-                if (KStandardDirs::makeDir(path)  == false) kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
-                KdenliveSettings::setDefaultprojectfolder(path);
+                if (KStandardDirs::makeDir(path)  == false) {
+                    kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
+                } else KdenliveSettings::setDefaultprojectfolder(path);
             }
         }
 
@@ -2799,8 +2809,9 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS
                 kWarning() << "//////  ERROR writing DVD CHAPTER file: " << chapterFile;
             } else {
                 file.write(doc.toString().toUtf8());
-                if (file.error() != QFile::NoError)
+                if (file.error() != QFile::NoError) {
                     kWarning() << "//////  ERROR writing DVD CHAPTER file: " << chapterFile;
+                }
                 file.close();
             }
         }
index 8aeb54978598e056b36b456897006fcd00f93dca..fef580f46c145b76f9b29e72f50a08ec829bcc5d 100644 (file)
@@ -621,7 +621,9 @@ void ProjectList::updateAllClips()
 
 void ProjectList::slotAddClip(const QList <QUrl> givenList, const QString &groupName, const QString &groupId)
 {
-    if (!m_commandStack) kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
+    if (!m_commandStack) {
+        kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
+    }
     KUrl::List list;
     if (givenList.isEmpty()) {
         // Build list of mime types
@@ -671,7 +673,9 @@ void ProjectList::slotRemoveInvalidClip(const QString &id, bool replace)
 
 void ProjectList::slotAddColorClip()
 {
-    if (!m_commandStack) kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
+    if (!m_commandStack) {
+        kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
+    }
     QDialog *dia = new QDialog(this);
     Ui::ColorClip_UI dia_ui;
     dia_ui.setupUi(dia);
@@ -689,7 +693,9 @@ void ProjectList::slotAddColorClip()
 
 void ProjectList::slotAddSlideshowClip()
 {
-    if (!m_commandStack) kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
+    if (!m_commandStack) {
+        kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
+    }
     SlideshowClip *dia = new SlideshowClip(m_timecode, this);
 
     if (dia->exec() == QDialog::Accepted) {
@@ -708,7 +714,9 @@ void ProjectList::slotAddTitleClip()
 void ProjectList::slotAddTitleTemplateClip()
 {
     QStringList groupInfo = getGroup();
-    if (!m_commandStack) kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
+    if (!m_commandStack) {
+        kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
+    }
 
     // Get the list of existing templates
     QStringList filter;
index d479aed308ca029aa57596260009c6b2f063a10c..7488beda7c1425bb65d2a472c29591529727f0e8 100644 (file)
@@ -835,7 +835,10 @@ int Render::setProducer(Mlt::Producer *producer, int position)
     m_mltProducer->set("skip_loop_filter", "all");
         m_mltProducer->set("skip_frame", "bidir");
     }*/
-    if (!m_mltProducer || !m_mltProducer->is_valid()) kDebug() << " WARNING - - - - -INVALID PLAYLIST: ";
+    if (!m_mltProducer || !m_mltProducer->is_valid()) {
+        kDebug() << " WARNING - - - - -INVALID PLAYLIST: ";
+        return -1;
+    }
 
     m_fps = m_mltProducer->get_fps();
     int error = connectPlaylist();
@@ -1519,7 +1522,10 @@ void Render::mltCutClip(int track, GenTime position)
     m_isBlocked = true;
 
     Mlt::Service service(m_mltProducer->parent().get_service());
-    if (service.type() != tractor_type) kWarning() << "// TRACTOR PROBLEM";
+    if (service.type() != tractor_type) {
+        kWarning() << "// TRACTOR PROBLEM";
+        return;
+    }
 
     Mlt::Tractor tractor(service);
     Mlt::Producer trackProducer(tractor.track(track));
@@ -1604,7 +1610,10 @@ void Render::mltUpdateClip(ItemInfo info, QDomElement element, Mlt::Producer *pr
 bool Render::mltRemoveClip(int track, GenTime position)
 {
     Mlt::Service service(m_mltProducer->parent().get_service());
-    if (service.type() != tractor_type) kWarning() << "// TRACTOR PROBLEM";
+    if (service.type() != tractor_type) {
+        kWarning() << "// TRACTOR PROBLEM";
+        return false;
+    }
 
     Mlt::Tractor tractor(service);
     mlt_service_lock(service.get_service());
@@ -1721,16 +1730,19 @@ void Render::mltInsertSpace(QMap <int, int> trackClipStartList, QMap <int, int>
         if (insertPos != -1) {
             insertPos += offset;
             int clipIndex = trackPlaylist.get_clip_index_at(insertPos);
-            if (diff > 0) trackPlaylist.insert_blank(clipIndex, diff - 1);
-            else {
+            if (diff > 0) {
+                trackPlaylist.insert_blank(clipIndex, diff - 1);
+            } else {
                 if (!trackPlaylist.is_blank(clipIndex)) clipIndex --;
-                if (!trackPlaylist.is_blank(clipIndex)) kDebug() << "//// ERROR TRYING TO DELETE SPACE FROM " << insertPos;
+                if (!trackPlaylist.is_blank(clipIndex)) {
+                    kDebug() << "//// ERROR TRYING TO DELETE SPACE FROM " << insertPos;
+                }
                 int position = trackPlaylist.clip_start(clipIndex);
                 int blankDuration = trackPlaylist.clip_length(clipIndex);
                 diff = -diff;
-                if (blankDuration - diff == 0)
+                if (blankDuration - diff == 0) {
                     trackPlaylist.remove(clipIndex);
-                else trackPlaylist.remove_region(position, diff);
+                else trackPlaylist.remove_region(position, diff);
             }
             trackPlaylist.consolidate_blanks(0);
         }
@@ -1782,15 +1794,20 @@ void Render::mltInsertSpace(QMap <int, int> trackClipStartList, QMap <int, int>
 
 
                 int clipIndex = trackPlaylist.get_clip_index_at(insertPos);
-                if (diff > 0) trackPlaylist.insert_blank(clipIndex, diff - 1);
-                else {
-                    if (!trackPlaylist.is_blank(clipIndex)) clipIndex --;
-                    if (!trackPlaylist.is_blank(clipIndex)) kDebug() << "//// ERROR TRYING TO DELETE SPACE FROM " << insertPos;
+                if (diff > 0) {
+                    trackPlaylist.insert_blank(clipIndex, diff - 1);
+                } else {
+                    if (!trackPlaylist.is_blank(clipIndex)) {
+                        clipIndex --;
+                    }
+                    if (!trackPlaylist.is_blank(clipIndex)) {
+                        kDebug() << "//// ERROR TRYING TO DELETE SPACE FROM " << insertPos;
+                    }
                     int position = trackPlaylist.clip_start(clipIndex);
                     int blankDuration = trackPlaylist.clip_length(clipIndex);
-                    if (diff + blankDuration == 0)
+                    if (diff + blankDuration == 0) {
                         trackPlaylist.remove(clipIndex);
-                    else trackPlaylist.remove_region(position, - diff);
+                    else trackPlaylist.remove_region(position, - diff);
                 }
                 trackPlaylist.consolidate_blanks(0);
             }
@@ -1850,7 +1867,10 @@ int Render::mltChangeClipSpeed(ItemInfo info, double speed, double oldspeed, int
     m_isBlocked = true;
     int newLength = 0;
     Mlt::Service service(m_mltProducer->parent().get_service());
-    if (service.type() != tractor_type) kWarning() << "// TRACTOR PROBLEM";
+    if (service.type() != tractor_type) {
+        kWarning() << "// TRACTOR PROBLEM";
+        return -1;
+    }
     //kDebug() << "Changing clip speed, set in and out: " << info.cropStart.frames(m_fps) << " to " << (info.endPos - info.startPos).frames(m_fps) - 1;
     Mlt::Tractor tractor(service);
     Mlt::Producer trackProducer(tractor.track(info.track));
@@ -2369,7 +2389,9 @@ bool Render::mltResizeClipEnd(ItemInfo info, GenTime clipDuration)
             if (trackPlaylist.is_blank(clipIndex)) {
                 int blankStart = trackPlaylist.clip_start(clipIndex);
                 int blankDuration = trackPlaylist.clip_length(clipIndex);
-                if (diff > blankDuration) kDebug() << "// ERROR blank clip is not large enough to get back required space!!!";
+                if (diff > blankDuration) {
+                    kDebug() << "// ERROR blank clip is not large enough to get back required space!!!";
+                }
                 if (diff - blankDuration == 0) {
                     trackPlaylist.remove(clipIndex);
                 } else trackPlaylist.remove_region(blankStart, diff);
@@ -2516,9 +2538,12 @@ void Render::mltUpdateClipProducer(int track, int pos, Mlt::Producer *prod)
     kDebug() << "NEW PROD ID: " << prod->get("id");
     m_isBlocked++;
     kDebug() << "// TRYING TO UPDATE CLIP at: " << pos << ", TK: " << track;
-    mlt_service_lock(m_mltConsumer->get_service());
     Mlt::Service service(m_mltProducer->parent().get_service());
-    if (service.type() != tractor_type) kWarning() << "// TRACTOR PROBLEM";
+    if (service.type() != tractor_type) {
+        kWarning() << "// TRACTOR PROBLEM";
+        return;
+    }
+    mlt_service_lock(m_mltConsumer->get_service());
 
     Mlt::Tractor tractor(service);
     Mlt::Producer trackProducer(tractor.track(track));
@@ -2548,7 +2573,10 @@ bool Render::mltMoveClip(int startTrack, int endTrack, int moveStart, int moveEn
     m_isBlocked++;
 
     Mlt::Service service(m_mltProducer->parent().get_service());
-    if (service.type() != tractor_type) kWarning() << "// TRACTOR PROBLEM";
+    if (service.type() != tractor_type) {
+        kWarning() << "// TRACTOR PROBLEM";
+        return false;
+    }
 
     Mlt::Tractor tractor(service);
     mlt_service_lock(service.get_service());
@@ -3103,7 +3131,10 @@ void Render::mltInsertTrack(int ix, bool videoTrack)
 
     Mlt::Service service(m_mltProducer->parent().get_service());
     mlt_service_lock(service.get_service());
-    if (service.type() != tractor_type) kWarning() << "// TRACTOR PROBLEM";
+    if (service.type() != tractor_type) {
+        kWarning() << "// TRACTOR PROBLEM";
+        return;
+    }
 
     Mlt::Tractor tractor(service);
 
index a1ac631040ae951372391868d78c0d95cb38bbda..7dce64887836902dec5acbb227e4e685cbe64f64 100644 (file)
@@ -113,7 +113,7 @@ Wizard::Wizard(bool upgrade, QWidget *parent) :
     page3->setTitle(i18n("Additional Settings"));
     m_extra.setupUi(page3);
     m_extra.projectfolder->setMode(KFile::Directory);
-    m_extra.projectfolder->setPath(KdenliveSettings::defaultprojectfolder());
+    m_extra.projectfolder->setUrl(KUrl(KdenliveSettings::defaultprojectfolder()));
     m_extra.videothumbs->setChecked(KdenliveSettings::videothumbnails());
     m_extra.audiothumbs->setChecked(KdenliveSettings::audiothumbnails());
     m_extra.autosave->setChecked(KdenliveSettings::crashrecovery());
@@ -506,8 +506,9 @@ void Wizard::adjustSettings()
         KdenliveSettings::setDefault_profile(selectedProfile);
     }
     QString path = m_extra.projectfolder->url().path();
-    if (KStandardDirs::makeDir(path) == false) kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
-    KdenliveSettings::setDefaultprojectfolder(path);
+    if (KStandardDirs::makeDir(path) == false) {
+        kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
+    } else KdenliveSettings::setDefaultprojectfolder(path);
 
 }