fileList << ui.fileListWidg->item( i )->text();
if( ui.subCheckBox->isChecked() && !ui.subInput->text().isEmpty() ) {
- mrl.append( " :sub-file=\"" + ui.subInput->text() + "\"" );
+ mrl.append( " :sub-file=" + colon_escape( ui.subInput->text() ) );
int align = ui.alignSubComboBox->itemData(
ui.alignSubComboBox->currentIndex() ).toInt();
mrl.append( " :subsdec-align=" + QString().setNum( align ) );
break;
case DSHOW_DEVICE:
fileList << "dshow://";
- mrl+= " :dshow-vdev=" + QString("%1").arg( vdevDshowW->getValue() );
- mrl+= " :dshow-adev=" + QString("%1").arg( adevDshowW->getValue() );
+ mrl+= " :dshow-vdev=" +
+ colon_escape( QString("%1").arg( vdevDshowW->getValue() ) );
+ mrl+= " :dshow-adev=" +
+ colon_escape( QString("%1").arg( adevDshowW->getValue() ) );
if( dshowVSizeLine->isModified() )
mrl += " :dshow-size=" + dshowVSizeLine->text();
break;
case CONFIG_ITEM_FILE:
case CONFIG_ITEM_DIRECTORY:
case CONFIG_ITEM_MODULE:
- tempMRL += QString("=%1").arg( qobject_cast<VStringConfigControl *>(control)->getValue() );
+ tempMRL += colon_escape( QString("=%1").arg( qobject_cast<VStringConfigControl *>(control)->getValue() ) );
break;
case CONFIG_ITEM_INTEGER:
tempMRL += QString("=%1").arg( qobject_cast<VIntConfigControl *>(control)->getValue() );
#include "dialogs_provider.hpp"
#include "recents.hpp"
+#include "util/qt_dirs.hpp"
#include <QTabWidget>
#include <QGridLayout>
if( i == 0 )
{
/* Take options from the UI, not from what we stored */
- QStringList optionsList = ui.advancedLineInput->text().split( ":" );
+ QStringList optionsList = ui.advancedLineInput->text().split( " :" );
/* Insert options */
for( int j = 0; j < optionsList.size(); j++ )
{
- QString qs = optionsList[j].trimmed();
+ QString qs = colon_unescape( optionsList[j] );
if( !qs.isEmpty() )
{
input_item_AddOption( p_input, qtu( qs ),
/* Add normal Options */
for( int j = 0; j < options.size(); j++ )
{
- QString qs = options[j].trimmed();
+ QString qs = colon_unescape( options[j] );
if( !qs.isEmpty() )
{
input_item_AddOption( p_input, qtu( qs ),
#define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) )
+static inline QString colon_escape( QString s )
+{
+ return s.replace( ":", "\\:" );
+}
+static inline QString colon_unescape( QString s )
+{
+ return s.replace( "\\:", ":" ).trimmed();
+}
#endif