[vlmc-devel] commit: Clip: Don't keep spaces when splitting metatags. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Fri May 14 18:51:26 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu May 13 22:11:32 2010 +0200| [9f93d966b23e19050a059386810ad8f1e6f58c5c] | committer: Hugo Beauzée-Luyssen 

Clip: Don't keep spaces when splitting metatags.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=9f93d966b23e19050a059386810ad8f1e6f58c5c
---

 src/Gui/ClipProperty.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/Gui/ClipProperty.cpp b/src/Gui/ClipProperty.cpp
index 5696d3d..eb50721 100644
--- a/src/Gui/ClipProperty.cpp
+++ b/src/Gui/ClipProperty.cpp
@@ -29,6 +29,7 @@
 #include <QTime>
 #include <QPushButton>
 #include <QInputDialog>
+#include <QRegExp>
 
 ClipProperty::ClipProperty( Clip* clip, QWidget *parent ) :
     QDialog( parent ),
@@ -106,7 +107,8 @@ void    ClipProperty::addTagsRequired()
     if ( ok == true && newTags.length() > 0 )
     {
         QStringList         list = m_model->stringList();
-        QStringList         toAdd = newTags.split( ",", QString::SkipEmptyParts );
+        QRegExp             regexp( "\\s*,\\s*" );
+        QStringList         toAdd = newTags.split( regexp, QString::SkipEmptyParts );
         list.append( toAdd );
         m_model->setStringList( list );
     }



More information about the Vlmc-devel mailing list