MCPcopy Create free account
hub / github.com/LMMS/lmms / upgradeElement_1_2_0_rc2_42

Function upgradeElement_1_2_0_rc2_42

src/core/DataFile.cpp:898–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896
897
898static void upgradeElement_1_2_0_rc2_42( QDomElement & el )
899{
900 if( el.hasAttribute( "syncmode" ) )
901 {
902 int syncmode = el.attribute( "syncmode" ).toInt();
903 QStringList names;
904 QDomNamedNodeMap atts = el.attributes();
905 for( uint i = 0; i < atts.length(); i++ )
906 {
907 QString name = atts.item( i ).nodeName();
908 if( name.endsWith( "_numerator" ) )
909 {
910 names << name.remove( "_numerator" )
911 + "_syncmode";
912 }
913 }
914 for( QStringList::iterator it = names.begin(); it < names.end();
915 ++it )
916 {
917 el.setAttribute( *it, syncmode );
918 }
919 }
920
921 QDomElement child = el.firstChildElement();
922 while ( !child.isNull() )
923 {
924 upgradeElement_1_2_0_rc2_42( child );
925 child = child.nextSiblingElement();
926 }
927}
928
929
930void DataFile::upgrade_1_2_0_rc2_42()

Callers 1

upgrade_1_2_0_rc2_42Method · 0.85

Calls 6

isNullMethod · 0.80
lengthMethod · 0.45
nodeNameMethod · 0.45
removeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected