Commit 82d7c41a authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: convert: don't enforce container extension (fix #9282)

parent 688f5db3
......@@ -129,7 +129,8 @@ void ConvertDialog::fileBrowse()
QString fileName = QFileDialog::getSaveFileName( this, qtr( "Save file..." ),
p_intf->p_sys->filepath,
QString( qtr( "Containers (*" ) + fileExtension + ")" ) );
QString( "%1 (*%2);;%3 (*.*)" ).arg( qtr( "Containers" ) )
.arg( fileExtension ).arg( qtr("All") ) );
fileLine->setText( toNativeSeparators( fileName ) );
setDestinationFileExtension();
}
......@@ -174,13 +175,10 @@ void ConvertDialog::setDestinationFileExtension()
if( !fileLine->text().isEmpty() && profile->isEnabled() )
{
QString newFileExtension = "." + profile->getMux();
QString newFileName;
int index = fileLine->text().lastIndexOf( "." );
if( index != -1 ) {
newFileName = fileLine->text().left( index ).append( newFileExtension );
} else {
newFileName = fileLine->text().append( newFileExtension );
}
if( fileLine->text().lastIndexOf( "." ) == -1 )
{
QString newFileName = fileLine->text().append( newFileExtension );
fileLine->setText( toNativeSeparators( newFileName ) );
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment