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

George Staikos staikos at kde.org
Thu May 25 14:48:38 CEST 2006


SVN commit 544587 by staikos:

no iVariables please.  add const.



 M  +8 -9      kstviewwindow.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewwindow.cpp #544586:544587
@@ -208,9 +208,9 @@
     if (paint.begin(&pixmap)) {
       QString dotFormat = QString(".") + format;
       QString filenameNew;
-      int iPos = filename.findRev(dotFormat, -1, false);
+      const int pos = filename.findRev(dotFormat, -1, false);
 
-      if (iPos != -1 && iPos == (int)(filename.length() - dotFormat.length())) {
+      if (pos != -1 && pos == int(filename.length() - dotFormat.length())) {
         filenameNew = filename;
       } else {
         filenameNew = filename + "." + format.lower();
@@ -238,22 +238,21 @@
     {
       QPrinter printer(QPrinter::HighResolution);
       QString dotFormat = QString(".eps");
-      int iPos = filename.findRev(dotFormat, -1, false);
-      int iResolution;
+      const int pos = filename.findRev(dotFormat, -1, false);
       
-      if (iPos != -1 && iPos == (int)(filename.length() - dotFormat.length())) {
+      if (pos != -1 && pos == int(filename.length() - dotFormat.length())) {
         filenameNewEps = filename;
       } else {
         filenameNewEps = filename + dotFormat;
       }
       filenameNew = filenameNewEps + ".ps";
 
-      iResolution = size.width() / 11;
-      if ( size.height() / 8 > iResolution ) {
-        iResolution = size.height() / 8;
+      int resolution = size.width() / 11;
+      if ( size.height() / 8 > resolution ) {
+        resolution = size.height() / 8;
       }
       
-      printer.setResolution(iResolution);
+      printer.setResolution(resolution);
       printer.setPageSize(QPrinter::Letter);
       printer.setOrientation(QPrinter::Landscape);
       printer.setOutputToFile(true);


More information about the Kst mailing list