added compat-code for loading old presets where content-node is named "channelsettings"

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1294 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-07-07 10:15:32 +00:00
parent 61f2990c19
commit 49ba9fe2c6
2 changed files with 13 additions and 22 deletions

View File

@@ -1,5 +1,9 @@
2008-07-07 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/core/mmp.cpp:
added compat-code for loading old presets where content-node is named
"channelsettings"
* plugins/sf2_player/sf2_player.cpp:
* plugins/sf2_player/sf2_player.h:
added support for pitch-bending

View File

@@ -151,28 +151,16 @@ multimediaProject::multimediaProject( const QString & _in_file_name,
QDomElement root = documentElement();
m_type = type( root.attribute( "type" ) );
QDomNode node = root.firstChild();
while( !node.isNull() )
{
if( node.isElement() )
{
if( node.nodeName() == "head" )
{
m_head = node.toElement();
}
else if( node.nodeName() == typeName( m_type ) )
{
m_content = node.toElement();
}
}
node = node.nextSibling();
}
m_head = root.elementsByTagName( "head" ).item( 0 ).toElement();
if( _upgrade && root.hasAttribute( "creatorversion" ) &&
root.attribute( "creatorversion" ) != LMMS_VERSION )
{
upgrade();
}
m_content = root.elementsByTagName( typeName( m_type ) ).
item( 0 ).toElement();
}
@@ -280,17 +268,16 @@ multimediaProject::ProjectTypes multimediaProject::type(
{
for( int i = 0; i < NumProjectTypes; ++i )
{
if( s_types[i].m_name == _type_name || (
s_types[i].m_name.contains( "," ) && (
s_types[i].m_name.section( ',', 0, 0 ) == _type_name ||
s_types[i].m_name.section( ',', 1, 1 ) == _type_name ) )
)
if( s_types[i].m_name == _type_name )
{
return( static_cast<multimediaProject::ProjectTypes>(
i ) );
}
}
if( _type_name == "channelsettings" )
{
return( multimediaProject::InstrumentTrackSettings );
}
return( UnknownType );
}