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

Peter Kümmel syntheticpp at gmx.net
Thu Apr 28 20:45:16 CEST 2011


SVN commit 1229653 by kuemmel:

some small compile fixes

 M  +2 -2      datawizard.cpp  
 M  +2 -2      formatgridhelper.cpp  
 M  +1 -1      view.cpp  
 M  +2 -2      viewitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/datawizard.cpp #1229652:1229653
@@ -1149,9 +1149,9 @@
     if (layout_type != CurvePlacement::Custom) {
       layout_type = CurvePlacement::Custom;
       if (_pagePlot->plotTabPlacement() == DataWizardPagePlot::SeparateTabs) {
-        num_columns = sqrt(plotList.size()/2);
+        num_columns = sqrt((double)plotList.size()/2);
       } else {
-        num_columns = sqrt(plotList.size());
+        num_columns = sqrt((double)plotList.size());
       }
     }
   }
--- branches/work/kst/portto4/kst/src/libkstapp/formatgridhelper.cpp #1229652:1229653
@@ -18,7 +18,7 @@
 
 /*****************************************************************************/
 /************** local helper functions for auto layout ***********************/
-void appendEdge(QList<struct AutoFormatEdges> &edges, double pos, double size, ViewItem *item) {
+void appendEdge(QList<AutoFormatEdges> &edges, double pos, double size, ViewItem *item) {
   struct AutoFormatEdges edge;
 
   edge.edge_number = -1;
@@ -35,7 +35,7 @@
 
 /*****************************************************************************/
 /************** local helper functions for auto layout ***********************/
-bool findNextEdgeLocation(QList<struct AutoFormatEdges> &edges, QList<qreal> &locations, qreal grid_resolution) {
+bool findNextEdgeLocation(QList<AutoFormatEdges> &edges, QList<qreal> &locations, qreal grid_resolution) {
   int n_edges = edges.size();
 
   int i_best_edge = -1;
--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #1229652:1229653
@@ -343,7 +343,7 @@
 
 void View::createCustomLayout() {
   bool ok;
-  int default_cols = qMax(1,int(sqrt(Data::self()->plotList().count())));
+  int default_cols = qMax(1,int(sqrt((double)Data::self()->plotList().count())));
   int columns = QInputDialog::getInteger(this, tr("Kst"),
                                       tr("Select Number of Columns"),default_cols, 0,
                                       10, 1, &ok);
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1229652:1229653
@@ -18,7 +18,7 @@
 #include "plotitemmanager.h"
 #include "document.h"
 #include "datacollection.h"
-#include "formatgridhelper.cpp"
+#include "formatgridhelper.h"
 
 #include "layoutboxitem.h"
 
@@ -815,7 +815,7 @@
 
 void ViewItem::createCustomLayout() {
   bool ok;
-  int default_cols = qMax(1,int(sqrt(Data::self()->plotList().count())));
+  int default_cols = qMax(1,int(sqrt((double)Data::self()->plotList().count())));
   int columns = QInputDialog::getInteger(view(), tr("Kst"),
                                       tr("Select Number of Columns"),default_cols, 0,
                                       10, 1, &ok);


More information about the Kst mailing list