[Kst] extragear/graphics/kst/src/libkstapp

George Staikos staikos at kde.org
Tue Aug 1 09:10:31 CEST 2006


SVN commit 568437 by staikos:

minor cleanup and add a comment about broken i18n usage


 M  +6 -7      kstplotdialog_i.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kstplotdialog_i.cpp #568436:568437
@@ -1421,11 +1421,7 @@
 }
 
 void KstPlotDialogI::applyPlotMarkers(Kst2DPlotPtr plot) {
-  KstMarkerList newMarkers;
-  KstMarker marker;
   Kst2DPlotList plots;
-  Kst2DPlotPtr plotExtra;
-  unsigned int i;
 
   if (markersThisPlot->isChecked()) {
     plots += plot;
@@ -1438,11 +1434,14 @@
     fill2DPlotList(plots);
   }
 
+  KstMarker marker;
+  KstMarkerList newMarkers;
   marker.isRising = false;
   marker.isFalling = false;
   marker.isVectorValue = false;
-  for (i = 0; i < PlotMarkerList->count(); ++i) {
+  for (unsigned i = 0; i < PlotMarkerList->count(); ++i) {
     marker.value = PlotMarkerList->text(i).toDouble();
+    // FIXME: this is very broken.  you can't search for i18n() substrings!
     if (PlotMarkerList->text(i).find( i18n("rising")) == -1 &&
         PlotMarkerList->text(i).find( i18n("falling")) == -1 &&
         PlotMarkerList->text(i).find( i18n("value")) == -1) {
@@ -1450,8 +1449,8 @@
     }
   }
 
-  for (i = 0; i < plots.size(); i++) {
-    plotExtra = plots[i];
+  for (unsigned i = 0; i < plots.size(); i++) {
+    Kst2DPlotPtr plotExtra = plots[i];
     plotExtra->setPlotMarkerList(newMarkers);
 
     // apply the auto-generation settings


More information about the Kst mailing list