| 896 | |
| 897 | |
| 898 | static 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 | |
| 930 | void DataFile::upgrade_1_2_0_rc2_42() |