From e5541392d5012d7ec14c716078abe13be9c61d6f Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 01:35:44 +0330 Subject: [PATCH 01/12] MSVC: Use correct compiler option --- lib/jkqtplotter.pri | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/jkqtplotter.pri b/lib/jkqtplotter.pri index 7ef4a34956..1f2436956b 100644 --- a/lib/jkqtplotter.pri +++ b/lib/jkqtplotter.pri @@ -1,6 +1,9 @@ - -QMAKE_CXXFLAGS += -fexceptions +!win32-msvc* { + QMAKE_CXXFLAGS += -fexceptions +} else { + QMAKE_CXXFLAGS += /EHsc +} HEADERS += $$PWD/jkqtplotter/jkqtpbaseplotter.h \ $$PWD/jkqtplotter/jkqtpdatastorage.h \ From 76df3202a9b495c4f227fb52969e5333b9bf2cc5 Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 01:36:52 +0330 Subject: [PATCH 02/12] MSVC: Use io.h instead of unistd.h --- lib/jkqtplottertools/jkqtptools.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/jkqtplottertools/jkqtptools.h b/lib/jkqtplottertools/jkqtptools.h index d1006077ff..b18ec223fd 100644 --- a/lib/jkqtplottertools/jkqtptools.h +++ b/lib/jkqtplottertools/jkqtptools.h @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -104,11 +103,13 @@ /** \brief a separator between two directories in a path between \c ' quotes */ #define JKQTPPATHSEPARATOR_CHAR '\\' #include + #include #else /** \brief a separator between two directories in a path between \c " quotes */ #define JKQTPPATHSEPARATOR_STRING "/" /** \brief a separator between two directories in a path between \c ' quotes */ #define JKQTPPATHSEPARATOR_CHAR '/' + #include #endif From d160668bc6a5f66a369caa18c92e40744e401677 Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 01:39:24 +0330 Subject: [PATCH 03/12] MSVC: dirent.h is not available Maybe we have to use an alternative Windows implementation --- lib/jkqtplottertools/jkqtptools.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jkqtplottertools/jkqtptools.h b/lib/jkqtplottertools/jkqtptools.h index b18ec223fd..9b55435cbf 100644 --- a/lib/jkqtplottertools/jkqtptools.h +++ b/lib/jkqtplottertools/jkqtptools.h @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -110,6 +109,7 @@ /** \brief a separator between two directories in a path between \c ' quotes */ #define JKQTPPATHSEPARATOR_CHAR '/' #include + #include #endif From 656e066d25c92ce3634644f0e6e33e709dd37346 Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 01:45:11 +0330 Subject: [PATCH 04/12] MSVC: Define _USE_MATH_DEFINES to enable M_PI, M_E,... --- lib/jkqtplotter.pri | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/jkqtplotter.pri b/lib/jkqtplotter.pri index 1f2436956b..525bf47bc2 100644 --- a/lib/jkqtplotter.pri +++ b/lib/jkqtplotter.pri @@ -3,6 +3,8 @@ QMAKE_CXXFLAGS += -fexceptions } else { QMAKE_CXXFLAGS += /EHsc + # To enable M_PI, M_E,... + DEFINES += _USE_MATH_DEFINES } HEADERS += $$PWD/jkqtplotter/jkqtpbaseplotter.h \ From 559c5be2fed1f035d1d7ee22ff5d6f88d227524d Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 01:51:41 +0330 Subject: [PATCH 05/12] MSVC: Define _CRT_NO_VA_START_VALIDATION Defined to fix error: C2338: va_start argument must not have reference type and must not be parenthesized --- lib/jkqtplotter.pri | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/jkqtplotter.pri b/lib/jkqtplotter.pri index 525bf47bc2..9f9840122b 100644 --- a/lib/jkqtplotter.pri +++ b/lib/jkqtplotter.pri @@ -5,6 +5,9 @@ QMAKE_CXXFLAGS += /EHsc # To enable M_PI, M_E,... DEFINES += _USE_MATH_DEFINES + # To fix error: C2338: va_start argument must not + # have reference type and must not be parenthesized + DEFINES += _CRT_NO_VA_START_VALIDATION } HEADERS += $$PWD/jkqtplotter/jkqtpbaseplotter.h \ From 4ae796d98f7c915829875b48e59c7c6e96f3ee3f Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 01:52:27 +0330 Subject: [PATCH 06/12] Fix expression did not evaluate to a constant --- lib/jkqtplotter/jkqtpimagetools.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/jkqtplotter/jkqtpimagetools.cpp b/lib/jkqtplotter/jkqtpimagetools.cpp index 484ed81f59..a16b40bd33 100644 --- a/lib/jkqtplotter/jkqtpimagetools.cpp +++ b/lib/jkqtplotter/jkqtpimagetools.cpp @@ -1962,8 +1962,9 @@ void JKQTPColorPaletteTools::cbDrawOutside(JKQTPEnhancedPainter& painter, QRect if (colorBarRightVisible) { painter.save(); - uint8_t h=1; - uint8_t d[200*h];//, dd[200*h]; + static const uint8_t h=1; + static const uint8_t dSize = 200*h; + uint8_t d[dSize];//, dd[200*h]; for (int i=0; i<200; i++) { for (int j=0; j(d, 200, 1, b, palette, 0, 199);*/ - uint8_t h=1; - - uint8_t d[200*h];//, dd[200*h]; + static const uint8_t h=1; + static const uint8_t dSize = 200*h; + uint8_t d[dSize];//, dd[200*h]; for (int i=0; i<200; i++) { for (int j=0; j Date: Wed, 5 Dec 2018 21:37:53 +0330 Subject: [PATCH 07/12] MSVC: Define _USE_MATH_DEFINES in some other project files --- test/jkqtplot_test/jkqtplot_test.pro | 2 ++ test/simpletest/jkqtplotter_simpletest.pro | 2 ++ test/simpletest_speed/jkqtplotter_simpletest_speed.pro | 2 ++ .../jkqtplotter_simpletest_symbols_and_errors.pro | 1 + .../jkqtplotter_simpletest_symbols_and_styles.pro | 1 + 5 files changed, 8 insertions(+) diff --git a/test/jkqtplot_test/jkqtplot_test.pro b/test/jkqtplot_test/jkqtplot_test.pro index 8d27e1b289..eb27a2993c 100644 --- a/test/jkqtplot_test/jkqtplot_test.pro +++ b/test/jkqtplot_test/jkqtplot_test.pro @@ -33,6 +33,8 @@ CONFIG += qt win32: LIBS += -lgdi32 +win32-msvc*: DEFINES += _USE_MATH_DEFINES + #QMAKE_CXXFLAGS += -O2 DEFINES -= -DQT_DLL diff --git a/test/simpletest/jkqtplotter_simpletest.pro b/test/simpletest/jkqtplotter_simpletest.pro index 1cab7ee706..8127cf1bfa 100644 --- a/test/simpletest/jkqtplotter_simpletest.pro +++ b/test/simpletest/jkqtplotter_simpletest.pro @@ -15,6 +15,8 @@ INCLUDEPATH += ../../lib CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib +win32-msvc*: DEFINES += _USE_MATH_DEFINES + # here you can activate some debug options #DEFINES += SHOW_JKQTPLOTTER_DEBUG #DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_speed/jkqtplotter_simpletest_speed.pro b/test/simpletest_speed/jkqtplotter_simpletest_speed.pro index 5f32c2987a..695a4905ea 100644 --- a/test/simpletest_speed/jkqtplotter_simpletest_speed.pro +++ b/test/simpletest_speed/jkqtplotter_simpletest_speed.pro @@ -16,6 +16,8 @@ INCLUDEPATH += ../../lib CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib +win32-msvc*: DEFINES += _USE_MATH_DEFINES + # here you can activate some debug options #DEFINES += SHOW_JKQTPLOTTER_DEBUG #DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro b/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro index 1717b39df3..031fbbdf17 100644 --- a/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro +++ b/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro @@ -16,6 +16,7 @@ INCLUDEPATH += ../../lib CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib +win32-msvc*: DEFINES += _USE_MATH_DEFINES # here you can activate some debug options #DEFINES += SHOW_JKQTPLOTTER_DEBUG diff --git a/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro b/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro index c795e203fc..c65c02f88d 100644 --- a/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro +++ b/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro @@ -16,6 +16,7 @@ INCLUDEPATH += ../../lib CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib +win32-msvc*: DEFINES += _USE_MATH_DEFINES # here you can activate some debug options #DEFINES += SHOW_JKQTPLOTTER_DEBUG From fac3bd744d8a82a3a2e2f4d41f906be4dfbe7c51 Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 21:44:55 +0330 Subject: [PATCH 08/12] MSVC: Fix warning C4138: '*/' found outside of comment --- lib/jkqtplotter/jkqtpbasegraphs.cpp | 10 +++++----- lib/jkqtplotter/jkqtpbaseplotter.cpp | 2 +- lib/jkqtplotter/jkqtpelements.cpp | 2 +- lib/jkqtplotter/jkqtpimageelements.cpp | 2 +- lib/jkqtplotter/jkqtplotter.cpp | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/jkqtplotter/jkqtpbasegraphs.cpp b/lib/jkqtplotter/jkqtpbasegraphs.cpp index 34b5ee3fc9..5b2230e3a7 100644 --- a/lib/jkqtplotter/jkqtpbasegraphs.cpp +++ b/lib/jkqtplotter/jkqtpbasegraphs.cpp @@ -861,27 +861,27 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J //std::cout<<"end\n"; } -bool JKQTPgraphErrors::intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter &/*painter*/, JKQtBasePlotter */*parent*/, JKQTPcoordinateAxis* /*xAxis*/, JKQTPcoordinateAxis* /*yAxis*/, int /*xColumn*/, int /*yColumn*/, int /*xErrorColumn*/, int /*yErrorColumn*/, JKQTPerrorPlotstyle /*xErrorStyle*/, JKQTPerrorPlotstyle /*yErrorStyle*/, long long /*index*/, QColor &/*errorColor*/, QColor &/*errorFillColor*/) +bool JKQTPgraphErrors::intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter &/*painter*/, JKQtBasePlotter * /*parent*/, JKQTPcoordinateAxis* /*xAxis*/, JKQTPcoordinateAxis* /*yAxis*/, int /*xColumn*/, int /*yColumn*/, int /*xErrorColumn*/, int /*yErrorColumn*/, JKQTPerrorPlotstyle /*xErrorStyle*/, JKQTPerrorPlotstyle /*yErrorStyle*/, long long /*index*/, QColor &/*errorColor*/, QColor &/*errorFillColor*/) { return false; } -double JKQTPgraphErrors::getXErrorU(int /*i*/, JKQTPdatastore */*ds*/) const +double JKQTPgraphErrors::getXErrorU(int /*i*/, JKQTPdatastore * /*ds*/) const { return 0.0; } -double JKQTPgraphErrors::getXErrorL(int /*i*/, JKQTPdatastore */*ds*/) const +double JKQTPgraphErrors::getXErrorL(int /*i*/, JKQTPdatastore * /*ds*/) const { return 0.0; } -double JKQTPgraphErrors::getYErrorU(int /*i*/, JKQTPdatastore */*ds*/) const +double JKQTPgraphErrors::getYErrorU(int /*i*/, JKQTPdatastore * /*ds*/) const { return 0.0; } -double JKQTPgraphErrors::getYErrorL(int/* i*/, JKQTPdatastore */*ds*/) const +double JKQTPgraphErrors::getYErrorL(int/* i*/, JKQTPdatastore * /*ds*/) const { return 0.0; } diff --git a/lib/jkqtplotter/jkqtpbaseplotter.cpp b/lib/jkqtplotter/jkqtpbaseplotter.cpp index 978b3f88e9..1dacd6141f 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.cpp +++ b/lib/jkqtplotter/jkqtpbaseplotter.cpp @@ -4348,7 +4348,7 @@ void JKQtBasePlotter::getDataColumnsByUserComboBoxSelected(const QString &name) } } -void JKQtBasePlotter::getDataColumnsByUserItemChanged(QListWidgetItem */*widgetitem*/) { +void JKQtBasePlotter::getDataColumnsByUserItemChanged(QListWidgetItem * /*widgetitem*/) { if (!dataColumnsListWidget) return; QStringList data; for (int i=0; icount(); i++) { diff --git a/lib/jkqtplotter/jkqtpelements.cpp b/lib/jkqtplotter/jkqtpelements.cpp index ae98319b2e..ee70d412d4 100644 --- a/lib/jkqtplotter/jkqtpelements.cpp +++ b/lib/jkqtplotter/jkqtpelements.cpp @@ -1690,7 +1690,7 @@ void JKQTPxyParametrizedErrorScatterGraph::drawErrorsBefore(JKQTPEnhancedPainter else plotErrorIndicators(painter, parent, xAxis, yAxis, xColumn, yColumn, datarange_start, datarange_end, 0, 0, &sortedIndices); } -bool JKQTPxyParametrizedErrorScatterGraph::intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter &/*painter*/, JKQtBasePlotter */*parent*/, JKQTPcoordinateAxis* /*xAxis*/, JKQTPcoordinateAxis* /*yAxis*/, int /*xColumn*/, int /*yColumn*/, int /*xErrorColumn*/, int /*yErrorColumn*/, JKQTPerrorPlotstyle /*xErrorStyle*/, JKQTPerrorPlotstyle /*yErrorStyle*/, long long index, QColor &/*errorColor*/, QColor &/*errorFillColor*/) +bool JKQTPxyParametrizedErrorScatterGraph::intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter &/*painter*/, JKQtBasePlotter * /*parent*/, JKQTPcoordinateAxis* /*xAxis*/, JKQTPcoordinateAxis* /*yAxis*/, int /*xColumn*/, int /*yColumn*/, int /*xErrorColumn*/, int /*yErrorColumn*/, JKQTPerrorPlotstyle /*xErrorStyle*/, JKQTPerrorPlotstyle /*yErrorStyle*/, long long index, QColor &/*errorColor*/, QColor &/*errorFillColor*/) { QColor c=getLocalColor(index); errorColor=c.darker(); diff --git a/lib/jkqtplotter/jkqtpimageelements.cpp b/lib/jkqtplotter/jkqtpimageelements.cpp index 7cb3d6e015..b4b941d5ae 100644 --- a/lib/jkqtplotter/jkqtpimageelements.cpp +++ b/lib/jkqtplotter/jkqtpimageelements.cpp @@ -2506,7 +2506,7 @@ void JKQTPColumnRGBMathImage::ensureImageData() this->dataModifier=parent->getDatastore()->getColumn(modifierColumn).getPointer(0); } -JKQTPImageModifierModeComboBox::JKQTPImageModifierModeComboBox(QWidget */*parent*/) +JKQTPImageModifierModeComboBox::JKQTPImageModifierModeComboBox(QWidget * /*parent*/) { addMode(JKQTPMathImageBase::ModifyNone, tr("none")); addMode(JKQTPMathImageBase::ModifyValue, tr("value")); diff --git a/lib/jkqtplotter/jkqtplotter.cpp b/lib/jkqtplotter/jkqtplotter.cpp index 0f3fd7e161..4e7032b068 100644 --- a/lib/jkqtplotter/jkqtplotter.cpp +++ b/lib/jkqtplotter/jkqtplotter.cpp @@ -573,15 +573,15 @@ void JKQtPlotter::update_overlays() { update(); } -void JKQtPlotter::synchronizeXAxis(double newxmin, double newxmax, double /*newymin*/, double /*newymax*/, JKQtPlotter */*sender*/) { +void JKQtPlotter::synchronizeXAxis(double newxmin, double newxmax, double /*newymin*/, double /*newymax*/, JKQtPlotter * /*sender*/) { setX(newxmin, newxmax); } -void JKQtPlotter::synchronizeYAxis(double /*newxmin*/, double /*newxmax*/, double newymin, double newymax, JKQtPlotter */*sender*/) { +void JKQtPlotter::synchronizeYAxis(double /*newxmin*/, double /*newxmax*/, double newymin, double newymax, JKQtPlotter * /*sender*/) { setY(newymin, newymax); } -void JKQtPlotter::synchronizeXYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQtPlotter */*sender*/) { +void JKQtPlotter::synchronizeXYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQtPlotter * /*sender*/) { setXY(newxmin, newxmax, newymin, newymax); } @@ -729,7 +729,7 @@ void JKQtPlotter::delayedResizeEvent() if (sizeChanged) update_plot(); } -void JKQtPlotter::leaveEvent(QEvent */*event*/) { +void JKQtPlotter::leaveEvent(QEvent * /*event*/) { if (!toolbarAlwaysOn) toolbar->hide(); } @@ -829,7 +829,7 @@ bool JKQtPlotter::get_zoomByMouseRectangle() const { return (mouseActionMode==JKQtPlotter::ZoomRectangle); } -void JKQtPlotter::modifyContextMenu(QMenu */*menu*/) +void JKQtPlotter::modifyContextMenu(QMenu * /*menu*/) { } From 12482b862a3d8f52ed5f56572a115eea167ee491 Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 21:53:11 +0330 Subject: [PATCH 09/12] Fix warning unreferenced formal parameter --- lib/jkqtplotter/jkqtpbarchartelements.cpp | 2 +- lib/jkqtplotter/jkqtpfilledcurveelements.cpp | 2 +- lib/jkqtplotter/jkqtpparsedfunctionelements.cpp | 6 +++--- test/jkqtplot_test/TestWidgetGraphs.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/jkqtplotter/jkqtpbarchartelements.cpp b/lib/jkqtplotter/jkqtpbarchartelements.cpp index fd80e6d23d..0109c630ee 100644 --- a/lib/jkqtplotter/jkqtpbarchartelements.cpp +++ b/lib/jkqtplotter/jkqtpbarchartelements.cpp @@ -602,7 +602,7 @@ QPen JKQTPbarVerticalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { return p; } -double JKQTPbarVerticalGraph::getParentStackedMax(int index) const +double JKQTPbarVerticalGraph::getParentStackedMax(int /*index*/) const { return false; } diff --git a/lib/jkqtplotter/jkqtpfilledcurveelements.cpp b/lib/jkqtplotter/jkqtpfilledcurveelements.cpp index e46c3e9d0e..d4922a33a5 100644 --- a/lib/jkqtplotter/jkqtpfilledcurveelements.cpp +++ b/lib/jkqtplotter/jkqtpfilledcurveelements.cpp @@ -679,7 +679,7 @@ QColor JKQTPfilledVerticalRangeGraph::getKeyLabelColor() return color; } -QBrush JKQTPfilledVerticalRangeGraph::getBrush(JKQTPEnhancedPainter &painter) const +QBrush JKQTPfilledVerticalRangeGraph::getBrush(JKQTPEnhancedPainter &/*painter*/) const { QBrush b; b.setColor(fillColor); diff --git a/lib/jkqtplotter/jkqtpparsedfunctionelements.cpp b/lib/jkqtplotter/jkqtpparsedfunctionelements.cpp index 6d46de3d69..709a5cae93 100644 --- a/lib/jkqtplotter/jkqtpparsedfunctionelements.cpp +++ b/lib/jkqtplotter/jkqtpparsedfunctionelements.cpp @@ -43,7 +43,7 @@ double JKQTPxParsedFunctionLineGraphFunction(double x, void* data) { return r.num; } } - } catch(std::exception& E) { + } catch(std::exception& /*E*/) { //qDebug()<getExpression()).arg(E.what()).arg(row).arg(column), @@ -138,7 +138,7 @@ void JKQTPxParsedFunctionLineGraph::createPlotData(bool /*collectParams*/) //qDebug()<<"createPlotData(): adding variables: "<parse(function.toStdString()); //qDebug()<<"createPlotData(): parsing: "<parse(errorFunction.toStdString()); //qDebug()<<"createPlotData(): parsing: "<(sender()); if (cmb) { @@ -314,7 +314,7 @@ void TestWidgetGraphs::setErrorStyle(int index) } } -void TestWidgetGraphs::setESSymbol(int index) +void TestWidgetGraphs::setESSymbol(int /*index*/) { QComboBox* cmb=qobject_cast(sender()); if (cmb) { From 1b99daf7e015af0dbdfbe9fbc09f15fedafd9ee6 Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 21:58:29 +0330 Subject: [PATCH 10/12] Fix warning variable is initialized but not referenced --- lib/jkqtplotter/jkqtpfilledcurveelements.cpp | 3 --- test/jkqtplot_test/TestWidgetGeometry.cpp | 14 +++++++------- test/jkqtplot_test/TestWidgetGraphs.cpp | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/lib/jkqtplotter/jkqtpfilledcurveelements.cpp b/lib/jkqtplotter/jkqtpfilledcurveelements.cpp index d4922a33a5..87fa826a79 100644 --- a/lib/jkqtplotter/jkqtpfilledcurveelements.cpp +++ b/lib/jkqtplotter/jkqtpfilledcurveelements.cpp @@ -604,9 +604,6 @@ void JKQTPfilledVerticalRangeGraph::draw(JKQTPEnhancedPainter &painter) // then the whole thing is drawn QPolygonF poly_all, phigh, plow; - double xold=-1; - - bool first=true; intSortData(); for (int iii=imin; iiiget_plotter()->set_axisAspectRatio(1); - JKQTPgeoLine* line1=new JKQTPgeoLine(plotGeo->get_plotter(), -1, -2, 2, 1.5); +// JKQTPgeoLine* line1=new JKQTPgeoLine(plotGeo->get_plotter(), -1, -2, 2, 1.5); //plotGeo->get_plotter()->addGraph(line1); - JKQTPgeoLine* line2=new JKQTPgeoLine(plotGeo->get_plotter(), 1, -5, 4, 3, QColor("blue"), 4); +// JKQTPgeoLine* line2=new JKQTPgeoLine(plotGeo->get_plotter(), 1, -5, 4, 3, QColor("blue"), 4); //plotGeo->get_plotter()->addGraph(line2); JKQTPgeoRectangle* rect1=new JKQTPgeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("blue"),2, Qt::SolidLine, QColor("lightblue")); @@ -55,18 +55,18 @@ TestWidgetGeometry::TestWidgetGeometry(QWidget *parent) : p.append(QPointF(0,-2)); p.append(QPointF(M_PI,5.5)); - JKQTPgeoPolygon* poly=new JKQTPgeoPolygon(plotGeo->get_plotter(), p, QColor("black"), 1.5, Qt::SolidLine, QColor(128,128,0,128)); +// JKQTPgeoPolygon* poly=new JKQTPgeoPolygon(plotGeo->get_plotter(), p, QColor("black"), 1.5, Qt::SolidLine, QColor(128,128,0,128)); //plotGeo->get_plotter()->addGraph(poly); - JKQTPgeoLines* lines=new JKQTPgeoLines(plotGeo->get_plotter(), p, QColor(255,255,0), 3); +// JKQTPgeoLines* lines=new JKQTPgeoLines(plotGeo->get_plotter(), p, QColor(255,255,0), 3); //plotGeo->get_plotter()->addGraph(lines); JKQTPgeoEllipse* ell1=new JKQTPgeoEllipse(plotGeo->get_plotter(), 0,0,2,4, QColor("black"),1.5, Qt::DotLine); plotGeo->get_plotter()->addGraph(ell1); - JKQTPgeoArc* arc=new JKQTPgeoArc(plotGeo->get_plotter(), 0,0,2,4,0, 135, QColor("blue"),3, Qt::SolidLine); +// JKQTPgeoArc* arc=new JKQTPgeoArc(plotGeo->get_plotter(), 0,0,2,4,0, 135, QColor("blue"),3, Qt::SolidLine); //plotGeo->get_plotter()->addGraph(arc); - JKQTPgeoPie* pie=new JKQTPgeoPie(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); +// JKQTPgeoPie* pie=new JKQTPgeoPie(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); //plotGeo->get_plotter()->addGraph(pie); - JKQTPgeoChord* chord=new JKQTPgeoChord(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); +// JKQTPgeoChord* chord=new JKQTPgeoChord(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); //plotGeo->get_plotter()->addGraph(chord); JKQTPgeoInfiniteLine* iline=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,1,1, QColor("blue"), 3); diff --git a/test/jkqtplot_test/TestWidgetGraphs.cpp b/test/jkqtplot_test/TestWidgetGraphs.cpp index 197c62b162..e2ca444ace 100644 --- a/test/jkqtplot_test/TestWidgetGraphs.cpp +++ b/test/jkqtplot_test/TestWidgetGraphs.cpp @@ -95,7 +95,7 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : size_t cx2=ds->addColumn(x2, N2, "x2"); size_t cy21=ds->addColumn(y21, N2, "y21"); size_t cy22=ds->addColumn(y22, N2, "y22"); - size_t cy23=ds->addColumn(y23, N2, "y23"); +// size_t cy23=ds->addColumn(y23, N2, "y23"); //size_t cy24=ds->addColumn(y24, N2, "y24"); size_t cx2r=ds->addColumn(x2r, N2, "x2r"); size_t cy21r=ds->addColumn(y21r, N2, "y21r"); @@ -302,7 +302,7 @@ void TestWidgetGraphs::setErrorStyle(int /*index*/) QComboBox* cmb=qobject_cast(sender()); if (cmb) { JKQTPxyGraphErrors* exy=dynamic_cast(plteErrors); - JKQTPxGraphErrors* ex=dynamic_cast(plteErrors); +// JKQTPxGraphErrors* ex=dynamic_cast(plteErrors); JKQTPyGraphErrors* ey=dynamic_cast(plteErrors); if (exy) { exy->set_yErrorStyle(String2JKQTPerrorPlotstyle(cmb->itemData(cmb->currentIndex()).toString())); From a77d6c28473b9f106d5fc2d1d5ca4914e466ac16 Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 21:39:23 +0330 Subject: [PATCH 11/12] MSVC: Include needed for chrono::system_clock --- test/simpletest_speed/speedtestplot.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/simpletest_speed/speedtestplot.h b/test/simpletest_speed/speedtestplot.h index 5e11a2a037..2aabc0075b 100644 --- a/test/simpletest_speed/speedtestplot.h +++ b/test/simpletest_speed/speedtestplot.h @@ -1,6 +1,8 @@ #pragma once #include #include +#include + #include "jkqtplotter/jkqtplotter.h" From 3ae82818041dae47629c8eb26c15a0a40fb8c4c6 Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 21:03:32 +0330 Subject: [PATCH 12/12] MSVC: Fix ambiguous call to overloaded function fpclassify() Its called by std::isnan(), std::isinf() and std::isfinite() that are used in the following methods: JKQTPimagePlot_getImageMin() JKQTPimagePlot_array2RGBimage() JKQTPimagePlot_array2image() --- lib/jkqtplotter/jkqtpimagetools.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/jkqtplotter/jkqtpimagetools.h b/lib/jkqtplotter/jkqtpimagetools.h index 709c9aaa29..d8130b33ed 100644 --- a/lib/jkqtplotter/jkqtpimagetools.h +++ b/lib/jkqtplotter/jkqtpimagetools.h @@ -221,7 +221,7 @@ inline double JKQTPimagePlot_getImageMin(T* dbl, int width, int height) for (int i=1; i(v)) || std::isinf(static_cast(v)))) { if (first) { min=max=v; first=false; @@ -252,7 +252,7 @@ inline double JKQTPimagePlot_getImageMax(T* dbl, int width, int height) for (int i=1; i(v)) || std::isinf(static_cast(v)))) { if (first) { min=max=v; first=false; @@ -296,7 +296,7 @@ inline void JKQTPimagePlot_array2RGBimage(T* dbl_in, int width, int height, QIma for (int i=1; i(v))) { if (first) { min=max=v; first=false; @@ -585,7 +585,7 @@ inline void JKQTPimagePlot_array2image(T* dbl_in, int width, int height, QImage for (int i=1; i(v)) || std::isinf(static_cast(v)))) { if (first) { min=max=v; first=false;