[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Wed May 25 03:45:39 CEST 2005


SVN commit 417947 by staikos:

- make it compile with older KDE versions (kmessagebox.h needed)
- fix int/uint mismatch
- remove unneeded variable
- make it Kst-style formatting while I'm in there


 M  +10 -18    ksttoplevelview.cpp  


--- trunk/extragear/graphics/kst/kst/ksttoplevelview.cpp #417946:417947
@@ -26,6 +26,7 @@
 #include <kinputdialog.h>
 #include <klineeditdlg.h>
 #include <klocale.h>
+#include <kmessagebox.h>
 
 // application specific includes
 #include "kst.h"
@@ -1059,32 +1060,23 @@
                                           1, 
                                           &ok, 
                                           0L);
-  if (ok)
-  {
+  if (ok) {
     cleanup(numCols);
   } 
 #else
-  bool done = false;
-  while (!done)
-  { 
+  while (!done) { 
     QString numColsString = KLineEditDlg::getText(i18n("Enter number of columns:"), i18n("Number of Columns"), &ok, 0L);
-    if (ok)
-    {
-      int numCols = numColsString.toInt();
-      if (numCols < 1 || numCols > _children.count())
-      {
+    if (ok) {
+      unsigned int numCols = numColsString.toInt();
+      if (numCols < 1 || numCols > _children.count()) {
         KMessageBox::sorry(0L, i18n("Please enter a number of columns between 1 and %d").arg(_selectionList.count()));
-      }
-      else
-      {
-        done = true;
+      } else {
         cleanup(numCols);
+        break;
       }
+    } else {
+      break;
     }
-    else
-    {
-      done = true;
-    }
   }
 #endif
 }


More information about the Kst mailing list