]> git.sesse.net Git - kdenlive/blobdiff - src/kdenlivedoc.cpp
If a file has a license (for example when imported through online resource widget),
[kdenlive] / src / kdenlivedoc.cpp
index 8b7a13e4c16543f73748b99bcaa62dccaec8d80f..fe263601cc01c67b0f8b2e18224f6d2e740912cb 100644 (file)
@@ -28,7 +28,7 @@
 #include "mainwindow.h"
 #include "documentchecker.h"
 #include "documentvalidator.h"
-#include "kdenlive-config.h"
+#include "config-kdenlive.h"
 #include "initeffects.h"
 
 #include <KDebug>
@@ -68,9 +68,22 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
     m_modified(false),
     m_projectFolder(projectFolder)
 {
+    // init m_profile struct
+    m_profile.frame_rate_num = 0;
+    m_profile.frame_rate_den = 0;
+    m_profile.width = 0;
+    m_profile.height = 0;
+    m_profile.progressive = 0;
+    m_profile.sample_aspect_num = 0;
+    m_profile.sample_aspect_den = 0;
+    m_profile.display_aspect_num = 0;
+    m_profile.display_aspect_den = 0;
+    m_profile.colorspace = 0;
+
     m_clipManager = new ClipManager(this);
     m_autoSaveTimer = new QTimer(this);
     m_autoSaveTimer->setSingleShot(true);
+    connect(m_clipManager, SIGNAL(displayMessage(QString, int)), parent, SLOT(slotGotProgressInfo(QString,int)));
     bool success = false;
 
     // init default document properties
@@ -1188,9 +1201,9 @@ void KdenliveDoc::slotAddClipList(const KUrl::List urls, const QString &group, c
 }
 
 
-void KdenliveDoc::slotAddClipFile(const KUrl &url, const QString &group, const QString &groupId)
+void KdenliveDoc::slotAddClipFile(const KUrl &url, const QString &group, const QString &groupId, const QString &comment)
 {
-    m_clipManager->slotAddClipFile(url, group, groupId);
+    m_clipManager->slotAddClipFile(url, group, groupId, comment);
     emit selectLastAddedClip(QString::number(m_clipManager->lastClipId()));
     setModified(true);
 }
@@ -1364,9 +1377,9 @@ QPoint KdenliveDoc::getTracksCount() const
     return QPoint(video, audio);
 }
 
-void KdenliveDoc::cachePixmap(const QString &fileId, const QPixmap &pix) const
+void KdenliveDoc::cacheImage(const QString &fileId, const QImage &img) const
 {
-    pix.save(m_projectFolder.path(KUrl::AddTrailingSlash) + "thumbs/" + fileId + ".png");
+    img.save(m_projectFolder.path(KUrl::AddTrailingSlash) + "thumbs/" + fileId + ".png");
 }
 
 bool KdenliveDoc::checkDocumentClips(QDomNodeList infoproducers)
@@ -1562,7 +1575,9 @@ void KdenliveDoc::updateProjectFolderPlacesEntry()
 
     const QString file = KStandardDirs::locateLocal("data", "kfileplaces/bookmarks.xml");
     KBookmarkManager *bookmarkManager = KBookmarkManager::managerForFile(file, "kfilePlaces");
+    if (!bookmarkManager) return;
     KBookmarkGroup root = bookmarkManager->root();
+    
     KBookmark bookmark = root.first();
 
     QString kdenliveName = KGlobal::mainComponent().componentName();