[Kstars-devel] branches/kstars/summer/kstars/kstars/comast

Prakash Mohan prak902000 at gmail.com
Wed Jul 15 20:20:12 CEST 2009


SVN commit 997317 by prakash:

There was a OAL compliance error with the way the results were stored. Correcting that.

CCMAIL: kstars-devel at kde.org


 M  +20 -1     log.cpp  
 M  +1 -0      log.h  


--- branches/kstars/summer/kstars/kstars/comast/log.cpp #997316:997317
@@ -336,9 +336,11 @@
     writer->writeStartElement( "result" );
     writer->writeAttribute( "xsi:type", "oal:findingsType" );
     writer->writeAttribute( "lang", o->lang() );
+    writer->writeStartElement( "description" );
     writer->writeCDATA( o->result() );
     writer->writeEndElement();
     writer->writeEndElement();
+    writer->writeEndElement();
 }
 void Comast::Log::writeGeoDate() {
     writer->writeStartElement( "geodate" );
@@ -806,8 +808,8 @@
             else if( reader->name() == "eyepiece" )
                 eyepiece = reader->readElementText();
             else if( reader->name() == "result" ) {
-                result = reader->readElementText();
                 lang = reader->attributes().value( "lang" ).toString();
+                result = readResult();
             } else
                 readUnknownElement();
         }
@@ -816,6 +818,23 @@
         m_observationList.append( o );
 }
 
+QString Comast::Log::readResult() {
+    QString result;
+    while( ! reader->atEnd() ) {
+        reader->readNext();
+
+        if( reader->isEndElement() )
+            break;
+        if( reader->isStartElement() ) {
+            if( reader->name() == "description" )
+                result = reader->readElementText();
+            else
+                readUnknownElement();
+        }
+    }
+    return result;
+}
+
 void Comast::Log::readGeoDate() {
     QString name, province, country, date;
     while( ! reader->atEnd() ) {
--- branches/kstars/summer/kstars/kstars/comast/log.h #997316:997317
@@ -85,6 +85,7 @@
         void readFilter( QString id );
         void readPosition();
         void readGeoDate();
+        QString readResult();
     private:
         Log() {}
         QList<SkyObject *> m_targetList;


More information about the Kstars-devel mailing list