]> Git trees. - libqmvoc.git/commitdiff
Part II of II of the 'ancient' bug: If the discovery country equals 'ancient' that...
authorCarsten Niehaus <cniehaus@gmx.de>
Sat, 16 Jun 2007 21:06:42 +0000 (21:06 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Sat, 16 Jun 2007 21:06:42 +0000 (21:06 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=676418

libscience/elementparser.cpp

index e18cf41806da1036eb7ec95e161a3ecee1f56b33..6da22c6a54dd1ce8977c80e6bebd3bc049dbcc45 100644 (file)
@@ -354,8 +354,13 @@ bool ElementSaxParser::characters(const QString &ch)
         d->inSPhrase = false;
     }
     else if (d->inCountry){
-        value = ch;
-        type = ChemicalDataObject::discoveryCountry; 
+        if ( ch == "ancient" ) {
+            value = -1;
+            type = ChemicalDataObject::date; 
+        } else {
+            value = ch;
+            type = ChemicalDataObject::discoveryCountry; 
+        }
         d->inCountry = false;
     }
     else//it is a non known value. Do not create a wrong object but return