1.1 --- a/xml.cpp Wed May 31 12:27:39 2006 +0000
1.2 +++ b/xml.cpp Tue Sep 05 11:53:54 2006 +0000
1.3 @@ -2,7 +2,9 @@
1.4
1.5 #include <qmessagebox.h>
1.6 #include <qcolor.h>
1.7 -#include <qstylesheet.h>
1.8 +#include <q3stylesheet.h>
1.9 +//Added by qt3to4:
1.10 +#include <QTextStream>
1.11 #include <iostream>
1.12
1.13 #include "misc.h"
1.14 @@ -503,26 +505,26 @@
1.15 QFile file (fn);
1.16 QString s; // Reading a note
1.17
1.18 - if ( !file.open( IO_ReadOnly) )
1.19 + if ( !file.open( QIODevice::ReadOnly) )
1.20 {
1.21 qWarning ("mapBuilderHandler::readNoteAttr: Couldn't load "+fn);
1.22 return false;
1.23 }
1.24 QTextStream stream( &file );
1.25 QString lines;
1.26 - while ( !stream.eof() ) {
1.27 + while ( !stream.atEnd() ) {
1.28 lines += stream.readLine()+"\n";
1.29 }
1.30 file.close();
1.31 // Convert to richtext
1.32 - if ( !QStyleSheet::mightBeRichText( lines ) )
1.33 + if ( !Q3StyleSheet::mightBeRichText( lines ) )
1.34 {
1.35 // Here we are workarounding the QT conversion method:
1.36 // convertFromPlainText does not generate valid xml, needed
1.37 // for the parser, but just <p> and <br> without closing tags.
1.38 // So we have to add those by ourselves
1.39 //lines=quotemeta (lines);
1.40 - lines = QStyleSheet::convertFromPlainText( lines, QStyleSheetItem::WhiteSpaceNormal );
1.41 + lines = Q3StyleSheet::convertFromPlainText( lines, Q3StyleSheetItem::WhiteSpaceNormal );
1.42 lines.replace ("<br>","<br />");
1.43 }
1.44