[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kwintv3/qtvision/plugins/channel/xml
From:       Dirk Ziegelmeier <dirk () ziegelmeier ! net>
Date:       2004-02-01 19:02:01
Message-ID: 20040201190201.90DF3993A () office ! kde ! org
[Download RAW message or body]

CVS commit by dziegel: 

xml channel format: Allow saving Umlauts & al. by converting channel file format to \
UTF8 and adding processing instructions


  M +37 -33    channelioxml.cpp   1.14


--- kdenonbeta/kwintv3/qtvision/plugins/channel/xml/channelioxml.cpp  #1.13:1.14
@@ -123,5 +123,5 @@ bool ChannelIOFormatXML::readDocument( C
 
 QVChannelPlugin::ChannelFileMetaInfo ChannelIOFormatXML::getMetaInfo( QIODevice \
                *file, const QString&) {
-QDomDocument mydoc;
+    QDomDocument mydoc;
     QVChannelPlugin::ChannelFileMetaInfo x;
     kdDebug() << "IOFormatXML::getMetaInfo(...)" << endl;
@@ -167,5 +167,5 @@ QDomDocument mydoc;
     }
 
-return x;
+    return x;
 }
 
@@ -249,5 +249,6 @@ bool ChannelIOFormatXML::save( ChannelSt
     QTextStream ts( file );
     writeDocument( store );
-    ts << doc.toString();
+
+    ts << doc.toString().utf8();
 
     return true;
@@ -257,5 +258,8 @@ void ChannelIOFormatXML::writeDocument( 
 {
     this->store = store;
+    
     doc = QDomDocument(); // Reset the document
+    QDomProcessingInstruction instr = \
doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\""); +    \
doc.appendChild(instr);  
     QDomElement root = writeElement( doc, "kwintv" );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic