Browse Source

Silence warnings in qwt

The latest version of qwt does have these warnings fixed. But the
latest version also has removed some deprecated printing functionality
which we are currently using. I gave a try at updating but it looked
fairly involved and over my level of understanding for that part of the
code. So pragmas for now. When someone does upgrade qwt the pragmas
will no longer be needed.
QGC4.4
Don Gagne 11 years ago
parent
commit
74136aa7f0
  1. 13
      libs/qwt/qwt_plot_spectrogram.cpp
  2. 11
      libs/qwt/qwt_plot_zoomer.h

13
libs/qwt/qwt_plot_spectrogram.cpp

@ -533,6 +533,15 @@ QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines( @@ -533,6 +533,15 @@ QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines(
d_data->contourLevels, d_data->conrecAttributes );
}
// These pragmas are local modifications to this third party library to silence warnings
#ifdef Q_OS_LINUX
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#elif defined(Q_OS_MAC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#endif
/*!
Paint the contour lines
@ -578,6 +587,10 @@ void QwtPlotSpectrogram::drawContourLines(QPainter *painter, @@ -578,6 +587,10 @@ void QwtPlotSpectrogram::drawContourLines(QPainter *painter,
}
}
#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif
/*!
\brief Draw the spectrogram

11
libs/qwt/qwt_plot_zoomer.h

@ -85,8 +85,19 @@ public: @@ -85,8 +85,19 @@ public:
public slots:
void moveBy(double x, double y);
// These pragmas are local modifications to this third party library to silence warnings
#ifndef Q_OS_WIN
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif
virtual void move(double x, double y);
#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif
virtual void zoom(const QwtDoubleRect &);
virtual void zoom(int up);

Loading…
Cancel
Save