[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Sat Jul 24 05:05:55 CEST 2004


CVS commit by staikos: 

- fixes according to ../devel-docs/codingstyle.txt (please read)
- use .isEmpty(), don't compare to a null/empty string
- change to a bitfield
- warning removed
- header reorganization


  M +2 -2      kst.cpp   1.194
  M +4 -3      kstfilter.cpp   1.14
  M +4 -4      plugin.h   1.24
  M +18 -18    pluginxmlparser.cpp   1.20


--- kdeextragear-2/kst/kst/kst.cpp  #1.193:1.194
@@ -50,4 +50,5 @@
 #include "extensionmgr.h"
 #include "kst.h"
+#include "kstarraydialog_i.h"
 #include "kstchangefiledialog_i.h"
 #include "kstchangenptsdialog_i.h"
@@ -66,4 +67,5 @@
 #include "ksthsdialog_i.h"
 #include "kstiface_impl.h"
+#include "kstimagedialog_i.h"
 #include "kstlabeldialog_i.h"
 #include "kstobject.h"
@@ -85,6 +87,4 @@
 #include "vectorsavedialog.h"
 
-#include "kstimagedialog_i.h"
-#include "kstarraydialog_i.h"
 
 #define KST_STATUSBAR_DATA 1

--- kdeextragear-2/kst/kst/kstfilter.cpp  #1.13:1.14
@@ -19,4 +19,5 @@
 #include <assert.h>
 #include <qstylesheet.h>
+#include <stdlib.h>
 
 #include <kdebug.h>
@@ -142,7 +143,7 @@ bool KstFilter::apply(const KstVectorPtr
   
   delete[] inVectors;
-  for (unsigned i=0; i<_outArrayCnt; i++) {
-    if (i != iOutIndex) {
-      free( outVectors[i] );
+  for (unsigned i = 0; i < _outArrayCnt; i++) {
+    if (i != (unsigned)iOutIndex) {
+      free(outVectors[i]);
     }
   }

--- kdeextragear-2/kst/kst/plugin.h  #1.23:1.24
@@ -91,8 +91,8 @@ public:
 
       // Intro
-      bool _isFilter;
-      bool _localdata;
-      bool _isFit;
-      bool _isFitWeighted;
+      bool _isFilter : 1;
+      bool _localdata : 1;
+      bool _isFit : 1;
+      bool _isFitWeighted : 1;
       QString _name;
       QString _readableName;

--- kdeextragear-2/kst/kst/pluginxmlparser.cpp  #1.19:1.20
@@ -134,16 +134,16 @@ QDomElement topElem = doc.documentElemen
       // if we have no input vector name check to see if we can declare one by default...
       //
-      if (_pluginData._filterInputVector == QString::null) {
-        int iNum = 0;
-        int iIndex;
+      if (_pluginData._filterInputVector.isEmpty()) {
+        int num = 0;
+        int inputIndex;
         
-        for (int i=0; i<(int)_pluginData._inputs.size(); i++) {
+        for (uint i = 0; i < _pluginData._inputs.size(); i++) {
           if (_pluginData._inputs[i]._type == Plugin::Data::IOValue::TableType) {
-            iNum++;
-            iIndex = i;
+            num++;
+            inputIndex = i;
           }
         }
-        if (iNum == 1) {
-          _pluginData._filterInputVector = _pluginData._inputs[iIndex]._name;
+        if (num == 1) {
+          _pluginData._filterInputVector = _pluginData._inputs[inputIndex]._name;
         }
       }
@@ -152,16 +152,16 @@ QDomElement topElem = doc.documentElemen
       // if we have no output vector name check to see if we can declare one by default...
       //
-      if (_pluginData._filterOutputVector == QString::null) {
-        int iNum = 0;
-        int iIndex;
+      if (_pluginData._filterOutputVector.isEmpty()) {
+        int num = 0;
+        int inputIndex;
 
-        for (int i=0; i<(int)_pluginData._outputs.size(); i++) {
+        for (uint i = 0; i < _pluginData._outputs.size(); i++) {
           if (_pluginData._outputs[i]._type == Plugin::Data::IOValue::TableType) {
-            iNum++;
-            iIndex = i;
+            num++;
+            inputIndex = i;
           }
         }
-        if (iNum == 1) {
-          _pluginData._filterOutputVector = _pluginData._outputs[iIndex]._name;
+        if (num == 1) {
+          _pluginData._filterOutputVector = _pluginData._outputs[inputIndex]._name;
         }
       }
@@ -170,8 +170,8 @@ QDomElement topElem = doc.documentElemen
       // check that we have valid vector names for the input and output...
       //
-      for (int i=0; i<(int)_pluginData._inputs.size(); i++) {
+      for (uint i = 0; i < _pluginData._inputs.size(); i++) {
         if (_pluginData._inputs[i]._type == Plugin::Data::IOValue::TableType &&
             _pluginData._inputs[i]._name == _pluginData._filterInputVector) {
-          for (int j=0; j<(int)_pluginData._outputs.size(); j++) {
+          for (uint j = 0; j < _pluginData._outputs.size(); j++) {
             if (_pluginData._outputs[i]._type == Plugin::Data::IOValue::TableType &&
                 _pluginData._outputs[j]._name == _pluginData._filterOutputVector) {





More information about the Kst mailing list