[vlmc-devel] commit: Restore ClipHelper's Uuid when loading a project ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Thu Apr 22 09:48:19 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed Apr 21 17:34:55 2010 +0200| [912ea1fb179f99ab0ad181504f63a72ceca3e78d] | committer: Hugo Beauzée-Luyssen
Restore ClipHelper's Uuid when loading a project
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=912ea1fb179f99ab0ad181504f63a72ceca3e78d
---
src/Metadata/MetaDataWorker.cpp | 1 -
src/Workflow/ClipHelper.cpp | 8 ++++++--
src/Workflow/ClipHelper.h | 3 ++-
src/Workflow/MainWorkflow.cpp | 5 ++++-
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/Metadata/MetaDataWorker.cpp b/src/Metadata/MetaDataWorker.cpp
index fa7dec9..731e01c 100644
--- a/src/Metadata/MetaDataWorker.cpp
+++ b/src/Metadata/MetaDataWorker.cpp
@@ -115,7 +115,6 @@ MetaDataWorker::metaDataAvailable()
quint32 width, height;
m_mediaPlayer->getSize( &width, &height );
- qDebug() << width << height;
m_media->setWidth( width );
m_media->setHeight( height );
m_media->setFps( m_mediaPlayer->getFps() );
diff --git a/src/Workflow/ClipHelper.cpp b/src/Workflow/ClipHelper.cpp
index d6cff1f..83b8851 100644
--- a/src/Workflow/ClipHelper.cpp
+++ b/src/Workflow/ClipHelper.cpp
@@ -24,7 +24,8 @@
#include "Clip.h"
-ClipHelper::ClipHelper( Clip* clip, qint64 begin /*= -1*/, qint64 end /*= -1*/ ) :
+ClipHelper::ClipHelper( Clip* clip, qint64 begin /*= -1*/, qint64 end /*= -1*/,
+ const QString& uuid /*= QString()*/ ) :
m_clip( clip ),
m_begin( begin ),
m_end( end )
@@ -33,7 +34,10 @@ ClipHelper::ClipHelper( Clip* clip, qint64 begin /*= -1*/, qint64 end /*= -1*/ )
m_begin = clip->begin();
if ( end == -1 )
m_end = clip->end();
- m_uuid = QUuid::createUuid();
+ if ( uuid.isEmpty() == true )
+ m_uuid = QUuid::createUuid();
+ else
+ m_uuid = QUuid( uuid );
}
void
diff --git a/src/Workflow/ClipHelper.h b/src/Workflow/ClipHelper.h
index 42e5d19..8b86e7b 100644
--- a/src/Workflow/ClipHelper.h
+++ b/src/Workflow/ClipHelper.h
@@ -33,7 +33,8 @@ class ClipHelper : public QObject
Q_OBJECT
public:
- ClipHelper( Clip* clip, qint64 begin = -1, qint64 end = -1 );
+ ClipHelper( Clip* clip, qint64 begin = -1, qint64 end = -1,
+ const QString& uuid = QString() );
Clip* clip()
{
diff --git a/src/Workflow/MainWorkflow.cpp b/src/Workflow/MainWorkflow.cpp
index ad1efbb..41db17f 100644
--- a/src/Workflow/MainWorkflow.cpp
+++ b/src/Workflow/MainWorkflow.cpp
@@ -310,11 +310,13 @@ MainWorkflow::loadProject( const QDomElement &root )
QString begin;
QString end;
QString startFrame;
+ QString chUuid;
uuid = clip.attribute( "uuid" );
begin = clip.attribute( "begin" );
end = clip.attribute( "end" );
startFrame = clip.attribute( "startFrame" );
+ chUuid = clip.attribute( "helper" );
if ( uuid.isEmpty() == true || startFrame.isEmpty() == true )
{
@@ -325,7 +327,8 @@ MainWorkflow::loadProject( const QDomElement &root )
Clip* c = Library::getInstance()->clip( uuid );
if ( c != NULL )
{
- ClipHelper *ch = new ClipHelper( c, begin.toLongLong(), end.toLongLong() );
+ ClipHelper *ch = new ClipHelper( c, begin.toLongLong(),
+ end.toLongLong(), chUuid );
addClip( ch, trackId, startFrame.toLongLong(), type, true );
}
clip = clip.nextSibling().toElement();
More information about the Vlmc-devel
mailing list