xml.cpp
changeset 395 7ced3733ba60
parent 394 67cfa6e6b863
child 398 d42881c25fb6
     1.1 --- a/xml.cpp	Tue Oct 24 15:36:38 2006 +0000
     1.2 +++ b/xml.cpp	Mon Oct 30 12:39:37 2006 +0000
     1.3 @@ -51,14 +51,18 @@
     1.4                      const QString& eName, const QXmlAttributes& atts ) 
     1.5  {
     1.6      QColor col;
     1.7 -	//cout << "startElement <"<<eName<<">  state="<<state <<"  laststate="<<laststate<<"   loadMode="<<loadMode<<endl;
     1.8 +	/* Testing
     1.9 +	cout << "startElement <"<< eName.ascii()<<
    1.10 +		">  state="<<state <<
    1.11 +		"  laststate="<<laststate<<
    1.12 +		"   loadMode="<<loadMode<<endl;
    1.13 +	*/	
    1.14      if ( state == StateInit && (eName == "vymmap")  ) 
    1.15  	{
    1.16          state = StateMap;
    1.17  		if (!atts.value( "version").isEmpty() ) 
    1.18  		{
    1.19 -			mc->setVersion(atts.value( "version" ));
    1.20 -			if (!mc->checkVersion())
    1.21 +			if (!checkVersion(atts.value("version")))
    1.22  				QMessageBox::warning( 0, "Warning: Version Problem" ,
    1.23  				   "<h3>Map is newer than VYM</h3>"
    1.24  				   "<p>The map you are just trying to load was "
    1.25 @@ -66,6 +70,8 @@
    1.26  				   "The version of this vym is " __VYM_VERSION
    1.27  				   ". If you run into problems after pressing "
    1.28  				   "the ok-button below, updating vym should help.");
    1.29 +			else	   
    1.30 +				mc->setVersion(atts.value( "version" ));
    1.31  
    1.32  		}
    1.33  		if (loadMode==NewMap)