QString fileString = "";
QStringList files = browse( qtr("Open File") );
foreach( QString file, files) {
- if( file.contains(" ") ) {
- fileString += "\"" + file + "\"";
- } else {
- fileString += file;
- }
+ fileString += "\"" + file + "\" ";
}
-
ui.fileInput->setEditText( fileString );
ui.fileInput->addItem( fileString );
if ( ui.fileInput->count() > 8 ) ui.fileInput->removeItem(0);
#include <QTabWidget>
#include <QGridLayout>
#include <QFileDialog>
+#include <QRegExp>
#include "dialogs/open.hpp"
#include "components/open.hpp"
{
this->toggleVisible();
mrl = ui.advancedLineInput->text();
- QStringList tempMRL = mrl.split(" ");
+ QStringList tempMRL = mrl.split( QRegExp("\"\\s+\""),
+ QString::SkipEmptyParts );
if( !isModal() )
{
for( size_t i = 0 ; i< tempMRL.size(); i++ )
{
+ QString mrli = tempMRL[i].remove( QRegExp( "^\"" ) ).
+ remove( QRegExp( "\"\\s+$" ) );
const char * psz_utf8 = qtu( tempMRL[i] );
/* Play the first one, parse and enqueue the other ones */
playlist_Add( THEPL, psz_utf8, NULL,