[vlmc-devel] Helper: Take uuid as QUuid

Yikai Lu git at videolan.org
Fri Aug 19 12:09:38 CEST 2016


vlmc | branch: medialibrary | Yikai Lu <luyikei.qmltu at gmail.com> | Fri Aug 19 00:35:28 2016 -0500| [c2587cf2e4662f8d9de83ce8bb48f6a5213b975e] | committer: Hugo Beauzée-Luyssen

Helper: Take uuid as QUuid

> https://code.videolan.org/videolan/vlmc/commit/c2587cf2e4662f8d9de83ce8bb48f6a5213b975e
---

 src/Media/Clip.cpp      | 3 +--
 src/Workflow/Helper.cpp | 4 ++--
 src/Workflow/Helper.h   | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/Media/Clip.cpp b/src/Media/Clip.cpp
index 43841ae..de3a58e 100644
--- a/src/Media/Clip.cpp
+++ b/src/Media/Clip.cpp
@@ -40,8 +40,7 @@
 #include <QVariant>
 
 Clip::Clip( QSharedPointer<Media> media, qint64 begin /*= 0*/, qint64 end /*= Backend::IInput::EndOfMedia */, const QUuid& uuid /*= QString()*/ ) :
-        //FIXME: uuid -> QString conversion should be removed, since the helper stores the UUID as a QUuid
-        Workflow::Helper( uuid.toString() ),
+        Workflow::Helper( uuid ),
         m_media( media ),
         m_input( media->input()->cut( begin, end ) ),
         m_isLinked( false )
diff --git a/src/Workflow/Helper.cpp b/src/Workflow/Helper.cpp
index 5208025..5ef8971 100644
--- a/src/Workflow/Helper.cpp
+++ b/src/Workflow/Helper.cpp
@@ -28,9 +28,9 @@
 
 using namespace Workflow;
 
-Helper::Helper( const QString &uuid/* = QString()*/ )
+Helper::Helper( const QUuid& uuid/* = QUuid()*/ )
 {
-    if ( uuid.isEmpty() == true )
+    if ( uuid.isNull() == true )
         m_uuid = QUuid::createUuid();
     else
         m_uuid = uuid;
diff --git a/src/Workflow/Helper.h b/src/Workflow/Helper.h
index 770b957..75ae10d 100644
--- a/src/Workflow/Helper.h
+++ b/src/Workflow/Helper.h
@@ -34,7 +34,7 @@ namespace   Workflow
         Q_OBJECT
 
         protected: //This class is not meant to be used by itself.
-            Helper( const QString &uuid = QStringLiteral() );
+            Helper( const QUuid &uuid = QUuid() );
             ~Helper();
 
         public:



More information about the Vlmc-devel mailing list