Skip to content

Commit 0674361

Browse files
authored
Merge pull request #4425 from nyalldawson/qwt
Remove old code for handling QWT < 6.1
2 parents f1d4ac3 + 348b65b commit 0674361

File tree

75 files changed

+30
-15753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+30
-15753
lines changed

cmake/FindQwt.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
3434
/usr/local/include
3535
"$ENV{LIB_DIR}/include"
3636
"$ENV{INCLUDE}"
37-
PATH_SUFFIXES qwt-qt5 qwt qwt5 qwt6
37+
PATH_SUFFIXES qwt-qt5 qwt qwt6
3838
)
3939

4040
IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)

src/app/CMakeLists.txt

Lines changed: 29 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -372,94 +372,35 @@ IF (WITH_QWTPOLAR)
372372
SET (WITH_INTERNAL_QWTPOLAR DEFAULT_WITH_INTERNAL_QWTPOLAR CACHE BOOL "Use internal build of QwtPolar")
373373

374374
IF(WITH_INTERNAL_QWTPOLAR)
375-
IF(QWT_VERSION_STR VERSION_LESS "6.0.0")
376-
SET(QGIS_APP_SRCS
377-
${QGIS_APP_SRCS}
378-
gps/qwtpolar-0.1/qwt_polar_canvas.cpp
379-
gps/qwtpolar-0.1/qwt_polar_curve.cpp
380-
gps/qwtpolar-0.1/qwt_polar_fitter.cpp
381-
gps/qwtpolar-0.1/qwt_polar_grid.cpp
382-
gps/qwtpolar-0.1/qwt_polar_itemdict.cpp
383-
gps/qwtpolar-0.1/qwt_polar_item.cpp
384-
gps/qwtpolar-0.1/qwt_polar_layout.cpp
385-
gps/qwtpolar-0.1/qwt_polar_magnifier.cpp
386-
gps/qwtpolar-0.1/qwt_polar_marker.cpp
387-
gps/qwtpolar-0.1/qwt_polar_panner.cpp
388-
gps/qwtpolar-0.1/qwt_polar_plot.cpp
389-
gps/qwtpolar-0.1/qwt_polar_point.cpp
390-
gps/qwtpolar-0.1/qwt_polar_spectrogram.cpp
391-
)
392-
393-
SET (QGIS_APP_MOC_HDRS
394-
${QGIS_APP_MOC_HDRS}
395-
gps/qwtpolar-0.1/qwt_polar_canvas.h
396-
gps/qwtpolar-0.1/qwt_polar_magnifier.h
397-
gps/qwtpolar-0.1/qwt_polar_panner.h
398-
gps/qwtpolar-0.1/qwt_polar_plot.h
399-
)
400-
401-
SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar-0.1)
402-
ELSEIF(QWT_VERSION_STR VERSION_LESS "6.1.0")
403-
SET(QGIS_APP_SRCS
404-
${QGIS_APP_SRCS}
405-
gps/qwtpolar-1.0/qwt_polar_canvas.cpp
406-
gps/qwtpolar-1.0/qwt_polar_curve.cpp
407-
gps/qwtpolar-1.0/qwt_polar_fitter.cpp
408-
gps/qwtpolar-1.0/qwt_polar_grid.cpp
409-
gps/qwtpolar-1.0/qwt_polar_item.cpp
410-
gps/qwtpolar-1.0/qwt_polar_itemdict.cpp
411-
gps/qwtpolar-1.0/qwt_polar_layout.cpp
412-
gps/qwtpolar-1.0/qwt_polar_magnifier.cpp
413-
gps/qwtpolar-1.0/qwt_polar_marker.cpp
414-
gps/qwtpolar-1.0/qwt_polar_panner.cpp
415-
gps/qwtpolar-1.0/qwt_polar_picker.cpp
416-
gps/qwtpolar-1.0/qwt_polar_plot.cpp
417-
gps/qwtpolar-1.0/qwt_polar_renderer.cpp
418-
gps/qwtpolar-1.0/qwt_polar_spectrogram.cpp
419-
)
420-
421-
SET (QGIS_APP_MOC_HDRS
422-
${QGIS_APP_MOC_HDRS}
423-
gps/qwtpolar-1.0/qwt_polar_canvas.h
424-
gps/qwtpolar-1.0/qwt_polar_magnifier.h
425-
gps/qwtpolar-1.0/qwt_polar_panner.h
426-
gps/qwtpolar-1.0/qwt_polar_picker.h
427-
gps/qwtpolar-1.0/qwt_polar_plot.h
428-
gps/qwtpolar-1.0/qwt_polar_renderer.h
429-
)
430-
431-
SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar-1.0)
432-
ELSE(QWT_VERSION_STR VERSION_LESS "6.1.0")
433-
SET(QGIS_APP_SRCS
434-
${QGIS_APP_SRCS}
435-
gps/qwtpolar-1.1.1/qwt_polar_canvas.cpp
436-
gps/qwtpolar-1.1.1/qwt_polar_curve.cpp
437-
gps/qwtpolar-1.1.1/qwt_polar_fitter.cpp
438-
gps/qwtpolar-1.1.1/qwt_polar_grid.cpp
439-
gps/qwtpolar-1.1.1/qwt_polar_item.cpp
440-
gps/qwtpolar-1.1.1/qwt_polar_itemdict.cpp
441-
gps/qwtpolar-1.1.1/qwt_polar_layout.cpp
442-
gps/qwtpolar-1.1.1/qwt_polar_magnifier.cpp
443-
gps/qwtpolar-1.1.1/qwt_polar_marker.cpp
444-
gps/qwtpolar-1.1.1/qwt_polar_panner.cpp
445-
gps/qwtpolar-1.1.1/qwt_polar_picker.cpp
446-
gps/qwtpolar-1.1.1/qwt_polar_plot.cpp
447-
gps/qwtpolar-1.1.1/qwt_polar_renderer.cpp
448-
gps/qwtpolar-1.1.1/qwt_polar_spectrogram.cpp
449-
)
450-
451-
SET (QGIS_APP_MOC_HDRS
452-
${QGIS_APP_MOC_HDRS}
453-
gps/qwtpolar-1.1.1/qwt_polar_canvas.h
454-
gps/qwtpolar-1.1.1/qwt_polar_magnifier.h
455-
gps/qwtpolar-1.1.1/qwt_polar_panner.h
456-
gps/qwtpolar-1.1.1/qwt_polar_picker.h
457-
gps/qwtpolar-1.1.1/qwt_polar_plot.h
458-
gps/qwtpolar-1.1.1/qwt_polar_renderer.h
459-
)
460-
461-
SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar-1.1.1)
462-
ENDIF(QWT_VERSION_STR VERSION_LESS "6.0.0")
375+
SET(QGIS_APP_SRCS
376+
${QGIS_APP_SRCS}
377+
gps/qwtpolar-1.1.1/qwt_polar_canvas.cpp
378+
gps/qwtpolar-1.1.1/qwt_polar_curve.cpp
379+
gps/qwtpolar-1.1.1/qwt_polar_fitter.cpp
380+
gps/qwtpolar-1.1.1/qwt_polar_grid.cpp
381+
gps/qwtpolar-1.1.1/qwt_polar_item.cpp
382+
gps/qwtpolar-1.1.1/qwt_polar_itemdict.cpp
383+
gps/qwtpolar-1.1.1/qwt_polar_layout.cpp
384+
gps/qwtpolar-1.1.1/qwt_polar_magnifier.cpp
385+
gps/qwtpolar-1.1.1/qwt_polar_marker.cpp
386+
gps/qwtpolar-1.1.1/qwt_polar_panner.cpp
387+
gps/qwtpolar-1.1.1/qwt_polar_picker.cpp
388+
gps/qwtpolar-1.1.1/qwt_polar_plot.cpp
389+
gps/qwtpolar-1.1.1/qwt_polar_renderer.cpp
390+
gps/qwtpolar-1.1.1/qwt_polar_spectrogram.cpp
391+
)
392+
393+
SET (QGIS_APP_MOC_HDRS
394+
${QGIS_APP_MOC_HDRS}
395+
gps/qwtpolar-1.1.1/qwt_polar_canvas.h
396+
gps/qwtpolar-1.1.1/qwt_polar_magnifier.h
397+
gps/qwtpolar-1.1.1/qwt_polar_panner.h
398+
gps/qwtpolar-1.1.1/qwt_polar_picker.h
399+
gps/qwtpolar-1.1.1/qwt_polar_plot.h
400+
gps/qwtpolar-1.1.1/qwt_polar_renderer.h
401+
)
402+
403+
SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar-1.1.1)
463404

464405
SET(QWTPOLAR_LIBRARY "")
465406
ENDIF(WITH_INTERNAL_QWTPOLAR)

src/app/gps/qgsgpsinformationwidget.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040
// QWT Charting widget
4141

4242
#include <qwt_global.h>
43-
#if (QWT_VERSION<0x060000)
44-
#include <qwt_array.h>
45-
#include <qwt_data.h>
46-
#endif
4743
#include <qwt_legend.h>
4844
#include <qwt_plot.h>
4945
#include <qwt_plot_grid.h>
@@ -502,12 +498,7 @@ void QgsGPSInformationWidget::disconnectGps()
502498

503499
void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation &info )
504500
{
505-
#if QWT_VERSION<0x060000
506-
QwtArray<double> myXData;//qwtarray is just a wrapped qvector
507-
QwtArray<double> mySignalData;//qwtarray is just a wrapped qvector
508-
#else
509501
QVector<QPointF> data;
510-
#endif
511502

512503
// set validity flag and status from GPS data
513504
// based on GGA, GSA and RMC sentences - the logic does not require all
@@ -563,21 +554,10 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation &in
563554

564555
if ( mStackedWidget->currentIndex() == 1 && info.satInfoComplete ) //signal
565556
{
566-
#if QWT_VERSION<0x060000
567-
myXData.append( i );
568-
mySignalData.append( 0 );
569-
myXData.append( i );
570-
mySignalData.append( currentInfo.signal );
571-
myXData.append( i + 1 );
572-
mySignalData.append( currentInfo.signal );
573-
myXData.append( i + 1 );
574-
mySignalData.append( 0 );
575-
#else
576557
data << QPointF( i, 0 );
577558
data << QPointF( i, currentInfo.signal );
578559
data << QPointF( i + 1, currentInfo.signal );
579560
data << QPointF( i + 1, 0 );
580-
#endif
581561
} //signal
582562

583563
if ( mStackedWidget->currentIndex() == 2 && info.satInfoComplete ) //satellites
@@ -631,11 +611,7 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation &in
631611

632612
if ( mStackedWidget->currentIndex() == 1 && info.satInfoComplete ) //signal
633613
{
634-
#if (QWT_VERSION<0x060000)
635-
mpCurve->setData( myXData, mySignalData );
636-
#else
637614
mpCurve->setSamples( data );
638-
#endif
639615
mpPlot->replot();
640616
} //signal
641617
#ifdef WITH_QWTPOLAR

src/app/gps/qwtpolar-0.1/qwt_polar.h

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)