]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/jobgraphs/jobplot.cpp
ebl Add more tests in migration time test (like for copy time test)
[bacula/bacula] / bacula / src / qt-console / jobgraphs / jobplot.cpp
index 5e50a6d3253fd6bec781de8136480279320081aa..866975de7e8146183bffed7dd5048de5afb4cada 100644 (file)
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -77,8 +77,7 @@ JobPlotControls::JobPlotControls()
 JobPlot::JobPlot(QTreeWidgetItem *parentTreeWidgetItem, JobPlotPass &passVals)
 {
    setupUserInterface();
-   m_name = tr("JobPlot");
-   pgInitialize(parentTreeWidgetItem);
+   pgInitialize(tr("JobPlot"), parentTreeWidgetItem);
    readSplitterSettings();
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/applications-graphics.png")));
@@ -362,10 +361,21 @@ void JobPlot::addCurve()
 
    // attach data
    int size = m_pjd.count();
+   int j = 0;
+#if defined(__GNU_C)
    double tval[size];
    double fval[size];
    double bval[size];
-   int j = 0;
+#else
+   double *tval;
+   double *fval;
+   double *bval;
+
+   tval = (double *)malloc(size * sizeof(double));
+   fval = (double *)malloc(size * sizeof(double));
+   bval = (double *)malloc(size * sizeof(double));
+#endif
+
    foreach (PlotJobData* plotJobData, m_pjd) {
 //      printf("%.0f %.0f %s\n", plotJobData->bytes, plotJobData->files,
 //              plotJobData->dt.toString(mainWin->m_dtformat).toUtf8().data());
@@ -401,6 +411,12 @@ void JobPlot::addCurve()
          mX->attach(m_jobPlot);
       }
    }
+
+#if !defined(__GNU_C)
+   free(tval);
+   free(fval);
+   free(bval);
+#endif
 }
 
 /*