Hi list
I need to upgrade the Qwt package to version 6.1.3 and there are a few symbol changes which I think are not dangerous.
I have been trying to make a python wrapper to the library: https://github.com/GauiStori/PyQt-Qwt So far it works ok for me even if it doesn't support all Qwt functionality but it only builds if I add the attached patch. Most of the patch is instantiations of virtual template functions. I think there should be a way around it without patching Qwt but I haven't found any.
Is anyone willing and able to take a look? The patch works for both Qwt 6.1.2 and 6.1.3 and PyQt-Qwt compiles without problems in Debian. I need to know how big problem the patch will make to the Qwt's C++ symbols.
Regards Gudjon
|
#Patch to simplify python interface --- a/src/qwt_series_data.h +++ b/src/qwt_series_data.h @@ -54,14 +54,14 @@ virtual ~QwtSeriesData(); //! \return Number of samples - virtual size_t size() const = 0; + virtual size_t size() const {return 0;}; /*! Return a sample \param i Index \return Sample at position i */ - virtual T sample( size_t i ) const = 0; + virtual T sample( size_t i ) const {return T();}; /*! Calculate the bounding rect of all samples @@ -75,7 +75,7 @@ \return Bounding rectangle */ - virtual QRectF boundingRect() const = 0; + virtual QRectF boundingRect() const {return d_boundingRect;}; /*! Set a the "rect of interest" --- a/src/qwt_series_store.h +++ b/src/qwt_series_store.h @@ -28,19 +28,19 @@ virtual ~QwtAbstractSeriesStore() {} //! dataChanged() indicates, that the series has been changed. - virtual void dataChanged() = 0; + virtual void dataChanged() {}; /*! Set a the "rectangle of interest" for the stored series \sa QwtSeriesData<T>::setRectOfInterest() */ - virtual void setRectOfInterest( const QRectF & ) = 0; + virtual void setRectOfInterest( const QRectF & ) {}; //! \return Bounding rectangle of the stored series - virtual QRectF dataRect() const = 0; + virtual QRectF dataRect() const {return QRectF( 0.0, 0.0, -1.0, -1.0 );}; //! \return Number of samples - virtual size_t dataSize() const = 0; + virtual size_t dataSize() const {return 0;}; }; /*! --- a/src/qwt_picker_machine.h +++ b/src/qwt_picker_machine.h @@ -70,8 +70,8 @@ SelectionType selectionType() const; + SelectionType d_selectionType; private: - const SelectionType d_selectionType; int d_state; };