Removed usage of ASCII C strings in several places
Still QString::toAscii() & friends were used in several places causing problems such as failed access to files with non-ASCII characters in name. Closes #2884115.
This commit is contained in:
@@ -2027,7 +2027,8 @@ extern "C"
|
||||
// neccessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new FlpImport( static_cast<const char *>( _data ) );
|
||||
return new FlpImport( QString::fromUtf8(
|
||||
static_cast<const char *>( _data ) ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -572,12 +572,10 @@ extern "C"
|
||||
// neccessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new MidiImport( static_cast<const char *>( _data ) );
|
||||
return new MidiImport( QString::fromUtf8(
|
||||
static_cast<const char *>( _data ) ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#undef pos
|
||||
#undef setValue
|
||||
|
||||
@@ -215,7 +215,7 @@ patmanInstrument::LoadErrors patmanInstrument::loadPatch(
|
||||
{
|
||||
unloadCurrentPatch();
|
||||
|
||||
FILE * fd = fopen( _filename.toAscii().constData() , "rb" );
|
||||
FILE * fd = fopen( _filename.toUtf8().constData() , "rb" );
|
||||
if( !fd )
|
||||
{
|
||||
perror( "fopen" );
|
||||
|
||||
Reference in New Issue
Block a user