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

Adam Treat treat at kde.org
Thu Mar 1 23:30:06 CET 2007


SVN commit 638421 by treat:

* ascii -> toAscii, QList api bit, stuff


 M  +4 -4      kst2dplot.cpp  
 M  +5 -5      kstdatacollection-gui.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/kst2dplot.cpp #638420:638421
@@ -957,7 +957,7 @@
 
 
 void Kst2DPlot::removeCurve(KstBaseCurvePtr incurve) {
-  Curves.remove(incurve);
+  Curves.removeAll(incurve);
   KstViewLegendPtr vl = legend();
   if (vl) {
     if (vl->trackContents()) {
@@ -1611,12 +1611,12 @@
       break;
     case AXIS_DISPLAY_QTTEXTDATEHHMMSS_SS:
       date.setYMD(year, month, day);
-      label.sprintf("%s %02d:%02d:%02.*f", date.toString(Qt::TextDate).ascii(),
+      label.sprintf("%s %02d:%02d:%02.*f", date.toString(Qt::TextDate).toAscii(),
                                             hour, minute, accuracy, second);
       break;
     case AXIS_DISPLAY_QTLOCALDATEHHMMSS_SS:
       date.setYMD(year, month, day);
-      label.sprintf("%s %02d:%02d:%02.*f", date.toString(Qt::LocalDate).ascii(),
+      label.sprintf("%s %02d:%02d:%02.*f", date.toString(Qt::LocalDate).toAscii(),
                                             hour, minute, accuracy, second);
       break;
     case AXIS_DISPLAY_KDE_SHORTDATE:
@@ -1957,7 +1957,7 @@
       }
       // case insensitive replace
       QString replacedExp = isX ? _xTransformedExp : _yTransformedExp;
-      replacedExp.replace(isX ? "x" : "y", QString::number(originalNumber), false);
+      replacedExp.replace(isX ? "x" : "y", QString::number(originalNumber), Qt::CaseInsensitive);
       bool transformedOK = false;
       double transformedNumber = Equation::interpret(replacedExp.toLatin1(), &transformedOK, replacedExp.length());
       tick_label->setText(QString::number(transformedNumber, 'g', LABEL_PRECISION));
--- branches/work/kst/portto4/kst/src/libkstapp/kstdatacollection-gui.cpp #638420:638421
@@ -126,12 +126,12 @@
   modval = qMax(vSize/100, 100);
 
   QString ltxt = "; " + v->tagName() + '\n';
-  f->writeBlock(ltxt.ascii(), ltxt.length());
+  f->writeBlock(ltxt.toAscii(), ltxt.length());
   ltxt.fill('-');
   ltxt[0] = ';';
   ltxt[1] = ' ';
   ltxt[ltxt.length() - 1] = '\n';
-  f->writeBlock(ltxt.ascii(), ltxt.length());
+  f->writeBlock(ltxt.toAscii(), ltxt.length());
 
   app->slotUpdateProgress(vSize, 0, QString::null);
 
@@ -185,12 +185,12 @@
   }
   ltxt += '\n';
 
-  f->writeBlock(ltxt.ascii(), ltxt.length());
+  f->writeBlock(ltxt.toAscii(), ltxt.length());
   ltxt.fill('-');
   ltxt[0] = ';';
   ltxt[1] = ' ';
   ltxt[ltxt.length() - 1] = '\n';
-  f->writeBlock(ltxt.ascii(), ltxt.length());
+  f->writeBlock(ltxt.toAscii(), ltxt.length());
 #if QT_VERSION >= 0x030200
   ltxt.reserve(vl.count()*17);
 #endif
@@ -212,7 +212,7 @@
       ltxt += QString::number(val, 'g', 15);
     }
     ltxt += "\n";
-    f->writeBlock(ltxt.ascii(), ltxt.length());
+    f->writeBlock(ltxt.toAscii(), ltxt.length());
     if (line % modval == 0) {
       app->slotUpdateProgress(maxlen, line, saving);
     }


More information about the Kst mailing list