From: Joel Holdsworth Date: Thu, 25 Apr 2013 11:45:29 +0000 (+0100) Subject: Added missing virtual destructors X-Git-Tag: pulseview-0.1.0~15 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f459c5400e067c4389c472b84194d760e7bfd585;p=pulseview.git Added missing virtual destructors This fixes bug #106. --- diff --git a/pv/prop/bool.cpp b/pv/prop/bool.cpp index 95cbb96e..ad9a13e7 100644 --- a/pv/prop/bool.cpp +++ b/pv/prop/bool.cpp @@ -36,6 +36,10 @@ Bool::Bool(QString name, Getter getter, Setter setter) : { } +Bool::~Bool() +{ +} + QWidget* Bool::get_widget(QWidget *parent) { if (_check_box) diff --git a/pv/prop/bool.h b/pv/prop/bool.h index 62e5ca36..22fc95cc 100644 --- a/pv/prop/bool.h +++ b/pv/prop/bool.h @@ -33,6 +33,8 @@ class Bool : public Property public: Bool(QString name, Getter getter, Setter setter); + virtual ~Bool(); + QWidget* get_widget(QWidget *parent); bool labeled_widget() const; diff --git a/pv/prop/double.cpp b/pv/prop/double.cpp index 6f6fe0c1..39e205ee 100644 --- a/pv/prop/double.cpp +++ b/pv/prop/double.cpp @@ -46,6 +46,10 @@ Double::Double(QString name, { } +Double::~Double() +{ +} + QWidget* Double::get_widget(QWidget *parent) { if (_spin_box) diff --git a/pv/prop/double.h b/pv/prop/double.h index b00adb14..5edb3924 100644 --- a/pv/prop/double.h +++ b/pv/prop/double.h @@ -41,6 +41,8 @@ public: Getter getter, Setter setter); + virtual ~Double(); + QWidget* get_widget(QWidget *parent); void commit(); diff --git a/pv/prop/int.cpp b/pv/prop/int.cpp index 502665da..761bd10a 100644 --- a/pv/prop/int.cpp +++ b/pv/prop/int.cpp @@ -42,6 +42,10 @@ Int::Int(QString name, { } +Int::~Int() +{ +} + QWidget* Int::get_widget(QWidget *parent) { if (_spin_box) diff --git a/pv/prop/int.h b/pv/prop/int.h index ef6fb1df..279bedc1 100644 --- a/pv/prop/int.h +++ b/pv/prop/int.h @@ -39,6 +39,8 @@ public: boost::optional< std::pair > range, Getter getter, Setter setter); + virtual ~Int(); + QWidget* get_widget(QWidget *parent); void commit(); diff --git a/pv/view/analogsignal.cpp b/pv/view/analogsignal.cpp index 251a0ffb..367b5890 100644 --- a/pv/view/analogsignal.cpp +++ b/pv/view/analogsignal.cpp @@ -50,6 +50,10 @@ AnalogSignal::AnalogSignal(QString name, shared_ptr data, _colour = SignalColours[probe_index % countof(SignalColours)]; } +AnalogSignal::~AnalogSignal() +{ +} + void AnalogSignal::set_scale(float scale) { _scale = scale; diff --git a/pv/view/analogsignal.h b/pv/view/analogsignal.h index ce1dff10..5ebf5016 100644 --- a/pv/view/analogsignal.h +++ b/pv/view/analogsignal.h @@ -45,6 +45,8 @@ public: AnalogSignal(QString name, boost::shared_ptr data, int probe_index); + virtual ~AnalogSignal(); + void set_scale(float scale); /** diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index 87fe5b04..21c9abbc 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -62,6 +62,10 @@ LogicSignal::LogicSignal(QString name, shared_ptr data, _colour = SignalColours[_probe_index % countof(SignalColours)]; } +LogicSignal::~LogicSignal() +{ +} + void LogicSignal::paint(QPainter &p, int y, int left, int right, double scale, double offset) { diff --git a/pv/view/logicsignal.h b/pv/view/logicsignal.h index a9c24b44..c4ae7551 100644 --- a/pv/view/logicsignal.h +++ b/pv/view/logicsignal.h @@ -49,6 +49,8 @@ public: boost::shared_ptr data, int probe_index); + virtual ~LogicSignal(); + /** * Paints the signal with a QPainter * @param p the QPainter to paint into.