[Kst] branches/work/kst/portto4/kst/src/libkst

Adam Treat treat at kde.org
Fri Feb 16 01:06:10 CET 2007


SVN commit 633997 by treat:

* Q3TextStream -> QTextStream


 M  +2 -2      kstamatrix.cpp  
 M  +1 -1      kstamatrix.h  
 M  +2 -1      kstavector.cpp  
 M  +1 -1      kstavector.h  
 M  +1 -1      kstdatasource.cpp  
 M  +2 -2      kstdatasource.h  
 M  +1 -1      kstmatrix.cpp  
 M  +1 -1      kstmatrix.h  
 M  +1 -1      kstrmatrix.cpp  
 M  +1 -1      kstrmatrix.h  
 M  +1 -1      kstrvector.cpp  
 M  +1 -1      kstrvector.h  
 M  +1 -1      kstscalar.cpp  
 M  +1 -1      kstscalar.h  
 M  +2 -1      kstsmatrix.cpp  
 M  +1 -1      kstsmatrix.h  
 M  +1 -1      kststring.cpp  
 M  +1 -1      kststring.h  
 M  +2 -1      kstsvector.cpp  
 M  +1 -1      kstsvector.h  
 M  +6 -6      ksttimezones.cpp  
 M  +1 -1      kstvector.cpp  
 M  +1 -1      kstvector.h  
 M  +1 -1      stdinsource.cpp  
 M  +1 -1      stdinsource.h  


--- branches/work/kst/portto4/kst/src/libkst/kstamatrix.cpp #633996:633997
@@ -23,7 +23,7 @@
 #include <q3cstring.h>
 #include <q3stylesheet.h>
 #include <klocale.h>
-#include <kmdcodec.h>
+#include <kcodecs.h>
 
 KstAMatrix::KstAMatrix(const QDomElement &e) : KstMatrix() {
   _editable = true;
@@ -95,7 +95,7 @@
 }
 
 
-void KstAMatrix::save(Q3TextStream &ts, const QString& indent) {
+void KstAMatrix::save(QTextStream &ts, const QString& indent) {
 
   QString indent2 = "  ";
   
--- branches/work/kst/portto4/kst/src/libkst/kstamatrix.h #633996:633997
@@ -25,7 +25,7 @@
     KstAMatrix(const QDomElement &e);
     KstAMatrix(KstObjectTag in_tag, uint nX, uint nY, double minX, double minY, double stepX, double stepY);
 
-    virtual void save(Q3TextStream &ts, const QString& indent = QString::null);
+    virtual void save(QTextStream &ts, const QString& indent = QString::null);
 };
 
 typedef KstSharedPtr<KstAMatrix> KstAMatrixPtr;
--- branches/work/kst/portto4/kst/src/libkst/kstavector.cpp #633996:633997
@@ -20,6 +20,7 @@
 
 #include "kstavector.h"
 #include "kstdebug.h"
+#include <qtextstream.h>
 
 KstAVector::KstAVector(const QDomElement &e)
 : KstVector(e) {
@@ -37,7 +38,7 @@
 }
 
 
-void KstAVector::save(Q3TextStream &ts, const QString& indent, bool saveAbsolutePosition) {
+void KstAVector::save(QTextStream &ts, const QString& indent, bool saveAbsolutePosition) {
   ts << indent << "<avector>" << endl;
   KstVector::save(ts, indent + "  ", saveAbsolutePosition);
   ts << indent << "</avector>" << endl;
--- branches/work/kst/portto4/kst/src/libkst/kstavector.h #633996:633997
@@ -28,7 +28,7 @@
   KST_EXPORT KstAVector(const QDomElement &e);
   KST_EXPORT KstAVector(int n, KstObjectTag tag);
 
-  void save(Q3TextStream &ts, const QString& indent = QString::null, bool saveAbsolutePosition = false);
+  void save(QTextStream &ts, const QString& indent = QString::null, bool saveAbsolutePosition = false);
 
   KstObject::UpdateType update(int update_counter);
 
--- branches/work/kst/portto4/kst/src/libkst/kstdatasource.cpp #633996:633997
@@ -603,7 +603,7 @@
 }
 
 
-void KstDataSource::save(Q3TextStream &ts, const QString& indent) {
+void KstDataSource::save(QTextStream &ts, const QString& indent) {
   QString name = Q3StyleSheet::escape(_filename);
   // Look to see if it was a URL and save the URL instead
   for (QMap<QString,QString>::ConstIterator i = urlMap.begin(); i != urlMap.end(); ++i) {
--- branches/work/kst/portto4/kst/src/libkst/kstdatasource.h #633996:633997
@@ -22,7 +22,7 @@
 #include <qdom.h>
 #include <qpointer.h>
 #include <qstring.h>
-#include <q3textstream.h>
+#include <qtextstream.h>
 #include <qwidget.h>
 
 #include <kconfig.h>
@@ -170,7 +170,7 @@
 
     /** Save file description info into stream ts.
       Remember to call the base class if you reimplement this. */
-    virtual void save(Q3TextStream &ts, const QString& indent = QString::null);
+    virtual void save(QTextStream &ts, const QString& indent = QString::null);
 
     const QString& sourceName() const { return _source; }
 
--- branches/work/kst/portto4/kst/src/libkst/kstmatrix.cpp #633996:633997
@@ -530,7 +530,7 @@
 }
 
 
-void KstMatrix::save(Q3TextStream &ts, const QString& indent) {
+void KstMatrix::save(QTextStream &ts, const QString& indent) {
   Q_UNUSED(ts);
   Q_UNUSED(indent);
 
--- branches/work/kst/portto4/kst/src/libkst/kstmatrix.h #633996:633997
@@ -96,7 +96,7 @@
     virtual int getUsage() const;
 
     // save the matrix
-    virtual void save(Q3TextStream &ts, const QString& indent = QString::null);
+    virtual void save(QTextStream &ts, const QString& indent = QString::null);
 
     // set tag name of the matrix
     virtual void setTagName(const KstObjectTag& tag);
--- branches/work/kst/portto4/kst/src/libkst/kstrmatrix.cpp #633996:633997
@@ -105,7 +105,7 @@
 }
 
 
-void KstRMatrix::save(Q3TextStream &ts, const QString& indent) {
+void KstRMatrix::save(QTextStream &ts, const QString& indent) {
   if (_file) {
 
     QString indent2 = "  ";
--- branches/work/kst/portto4/kst/src/libkst/kstrmatrix.h #633996:633997
@@ -37,7 +37,7 @@
     KstRMatrix(const QDomElement &e);
     
     // save KstRMatrix
-    virtual void save(Q3TextStream &ts, const QString& indent = QString::null);
+    virtual void save(QTextStream &ts, const QString& indent = QString::null);
     
     virtual ~KstRMatrix();
     
--- branches/work/kst/portto4/kst/src/libkst/kstrvector.cpp #633996:633997
@@ -329,7 +329,7 @@
 
 
 /** Save vector information */
-void KstRVector::save(Q3TextStream &ts, const QString& indent, bool saveAbsolutePosition) {
+void KstRVector::save(QTextStream &ts, const QString& indent, bool saveAbsolutePosition) {
   if (_file) {    
     ts << indent << "<vector>" << endl;
     KstVector::save(ts, indent + "  ", saveAbsolutePosition);
--- branches/work/kst/portto4/kst/src/libkst/kstrvector.h #633996:633997
@@ -85,7 +85,7 @@
   int samplesPerFrame() const;
 
   /** Save vector information */
-  virtual void save(Q3TextStream &ts, const QString& indent = QString::null, bool saveAbsolutePosition = false);
+  virtual void save(QTextStream &ts, const QString& indent = QString::null, bool saveAbsolutePosition = false);
 
   /** return the name of the file if a RVector - otherwise return "" */
   QString filename() const;
--- branches/work/kst/portto4/kst/src/libkst/kstscalar.cpp #633996:633997
@@ -119,7 +119,7 @@
 }
 
 
-void KstScalar::save(Q3TextStream &ts, const QString& indent) {
+void KstScalar::save(QTextStream &ts, const QString& indent) {
   ts << indent << "<tag>" << Q3StyleSheet::escape(tag().tagString()) << "</tag>" << endl;
   if (_orphan) {
     ts << indent << "<orphan/>" << endl;
--- branches/work/kst/portto4/kst/src/libkst/kstscalar.h #633996:633997
@@ -48,7 +48,7 @@
     QString label() const;
 
     /** Save scalar information */
-    virtual void save(Q3TextStream &ts, const QString& indent = QString::null);
+    virtual void save(QTextStream &ts, const QString& indent = QString::null);
 
     /** Update the scalar.  Return true if there was new data. */
     UpdateType update(int updateCounter = -1);
--- branches/work/kst/portto4/kst/src/libkst/kstsmatrix.cpp #633996:633997
@@ -16,6 +16,7 @@
  *                                                                         *
  ***************************************************************************/
 #include "kstsmatrix.h"
+#include <qtextstream.h>
 #include <q3stylesheet.h>
 
 KstSMatrix::KstSMatrix(const QDomElement &e) : KstMatrix() {
@@ -72,7 +73,7 @@
   change(tag, nX, nY, minX, minY, stepX, stepY, gradZMin, gradZMax, xDirection);
 }
 
-void KstSMatrix::save(Q3TextStream &ts, const QString& indent) {
+void KstSMatrix::save(QTextStream &ts, const QString& indent) {
       
   QString indent2 = "  ";
   
--- branches/work/kst/portto4/kst/src/libkst/kstsmatrix.h #633996:633997
@@ -28,7 +28,7 @@
                double minX, double minY, double stepX, double stepY,
                double gradZMin, double gradZMax, bool xDirection);
 
-    virtual void save(Q3TextStream &ts, const QString& indent = QString::null);
+    virtual void save(QTextStream &ts, const QString& indent = QString::null);
 
     void change(KstObjectTag tag, uint nX, uint nY,
                 double minX, double minY, double stepX, double stepY,
--- branches/work/kst/portto4/kst/src/libkst/kststring.cpp #633996:633997
@@ -82,7 +82,7 @@
 }
 
 
-void KstString::save(Q3TextStream &ts, const QString& indent) {
+void KstString::save(QTextStream &ts, const QString& indent) {
   ts << indent << "<tag>" << Q3StyleSheet::escape(tag().tagString()) << "</tag>" << endl;
   if (_orphan) {
     ts << indent << "<orphan/>" << endl;
--- branches/work/kst/portto4/kst/src/libkst/kststring.h #633996:633997
@@ -35,7 +35,7 @@
     void setTagName(const KstObjectTag& tag);
 
     /** Save information */
-    void save(Q3TextStream &ts, const QString& indent = QString::null);
+    void save(QTextStream &ts, const QString& indent = QString::null);
 
     /** Update the vector.  Return true if there was new data. */
     UpdateType update(int updateCounter = -1);
--- branches/work/kst/portto4/kst/src/libkst/kstsvector.cpp #633996:633997
@@ -17,6 +17,7 @@
 #include "kstsvector.h"
 #include "ksdebug.h"
 #include <q3stylesheet.h>
+#include <qtextstream.h>
 
 KstSVector::KstSVector(const QDomElement &e) : KstVector(e) {
   double in_x0 = 0.0;
@@ -53,7 +54,7 @@
 }
 
 
-void KstSVector::save(Q3TextStream &ts, const QString& indent, bool saveAbsolutePosition) {
+void KstSVector::save(QTextStream &ts, const QString& indent, bool saveAbsolutePosition) {
   ts << indent << "<svector>" << endl;
   KstVector::save(ts, indent + "  ", saveAbsolutePosition);
   ts << indent << "  <min>" << min() << "</min>" << endl;
--- branches/work/kst/portto4/kst/src/libkst/kstsvector.h #633996:633997
@@ -28,7 +28,7 @@
   KstSVector(const QDomElement &e);
   KstSVector(double x0, double x1, int n, KstObjectTag tag);
 
-  void save(Q3TextStream &ts, const QString& indent = QString::null, bool saveAbsolutePosition = false);
+  void save(QTextStream &ts, const QString& indent = QString::null, bool saveAbsolutePosition = false);
 
   void changeRange(double x0, double x1, int n);
   KstObject::UpdateType update(int update_counter);
--- branches/work/kst/portto4/kst/src/libkst/ksttimezones.cpp #633996:633997
@@ -29,7 +29,7 @@
 #include <qfile.h>
 #include <qregexp.h>
 #include <qstringlist.h>
-#include <q3textstream.h>
+#include <qtextstream.h>
 
 #include <cerrno>
 #include <climits>
@@ -449,7 +449,7 @@
     }
 
     // Parse the zone.tab.
-    Q3TextStream str(&f);
+    QTextStream str(&f);
     QRegExp lineSeparator("[ \t]");
     QRegExp ordinateSeparator("[+-]");
     KSharedPtr<KstTimezoneSource> db(new KstTimezoneSource(m_zoneinfoDir));
@@ -586,8 +586,8 @@
         f.setFileName("/etc/default/init");
         if (f.open(QIODevice::ReadOnly))
         {
-            Q3TextStream ts(&f);
-            ts.setEncoding(Q3TextStream::Latin1);
+            QTextStream ts(&f);
+            ts.setCodec("latin1");
 
             // Read the last line starting "TZ=".
             while (!ts.atEnd())
@@ -605,8 +605,8 @@
     }
     else
     {
-        Q3TextStream ts(&f);
-        ts.setEncoding(Q3TextStream::Latin1);
+        QTextStream ts(&f);
+        ts.setCodec("latin1");
 
         // Read the first line.
         if (!ts.atEnd())
--- branches/work/kst/portto4/kst/src/libkst/kstvector.cpp #633996:633997
@@ -588,7 +588,7 @@
 
 
 
-void KstVector::save(Q3TextStream &ts, const QString& indent, bool saveAbsolutePosition) {
+void KstVector::save(QTextStream &ts, const QString& indent, bool saveAbsolutePosition) {
   Q_UNUSED(saveAbsolutePosition)
   ts << indent << "<tag>" << Q3StyleSheet::escape(tag().tagString()) << "</tag>" << endl;
   if (_saveData) {
--- branches/work/kst/portto4/kst/src/libkst/kstvector.h #633996:633997
@@ -125,7 +125,7 @@
     virtual int getUsage() const;
 
     /** Save vector information */
-    virtual void save(Q3TextStream &ts, const QString& indent = QString::null, bool saveAbsolutePosition = false);
+    virtual void save(QTextStream &ts, const QString& indent = QString::null, bool saveAbsolutePosition = false);
 
     /** Generate a new vector [x0..x1] with n total points */
     // #### Remove
--- branches/work/kst/portto4/kst/src/libkst/stdinsource.cpp #633996:633997
@@ -153,7 +153,7 @@
 }
 
 
-void KstStdinSource::save(Q3TextStream &ts, const QString& indent) {
+void KstStdinSource::save(QTextStream &ts, const QString& indent) {
   if (isValid()) {
     return _src->save(ts, indent);
   }
--- branches/work/kst/portto4/kst/src/libkst/stdinsource.h #633996:633997
@@ -42,7 +42,7 @@
 
     virtual QString fileType() const;
 
-    virtual void save(Q3TextStream &ts, const QString& indent = QString::null);
+    virtual void save(QTextStream &ts, const QString& indent = QString::null);
 
     virtual bool isValid() const;
 


More information about the Kst mailing list