From a723b459d785b5a71af517b6c61df9e1320d36a4 Mon Sep 17 00:00:00 2001 From: teyssieuman Date: Wed, 6 Jan 2016 21:26:58 +0100 Subject: [PATCH 1/2] Remove some compilation warnings on linux --- DSView/pv/data/dsosnapshot.cpp | 6 ++---- DSView/pv/data/dsosnapshot.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/DSView/pv/data/dsosnapshot.cpp b/DSView/pv/data/dsosnapshot.cpp index 4e0e1b26..cf245049 100644 --- a/DSView/pv/data/dsosnapshot.cpp +++ b/DSView/pv/data/dsosnapshot.cpp @@ -237,9 +237,8 @@ void DsoSnapshot::append_payload_to_envelope_levels(bool header) _envelope_done = true; } -double DsoSnapshot::cal_vrms(double zero_off, int index) const +double DsoSnapshot::cal_vrms(double zero_off, unsigned int index) const { - assert(index >= 0); assert(index < _channel_num); // root-meam-squart value @@ -272,9 +271,8 @@ double DsoSnapshot::cal_vrms(double zero_off, int index) const return vrms; } -double DsoSnapshot::cal_vmean(int index) const +double DsoSnapshot::cal_vmean(unsigned int index) const { - assert(index >= 0); assert(index < _channel_num); // mean value diff --git a/DSView/pv/data/dsosnapshot.h b/DSView/pv/data/dsosnapshot.h index eb3788bc..56dfb18d 100644 --- a/DSView/pv/data/dsosnapshot.h +++ b/DSView/pv/data/dsosnapshot.h @@ -84,8 +84,8 @@ public: void enable_envelope(bool enable); - double cal_vrms(double zero_off, int index) const; - double cal_vmean(int index) const; + double cal_vrms(double zero_off, unsigned int index) const; + double cal_vmean(unsigned int index) const; private: void reallocate_envelope(Envelope &l); From 73cbab6f43d21a6868fccf1270a5d5d1fc1e3180 Mon Sep 17 00:00:00 2001 From: teyssieuman Date: Wed, 6 Jan 2016 22:07:03 +0100 Subject: [PATCH 2/2] Supress the "QT" error message that appears here: https://www.youtube.com/watch?v=bjITW4hfILs --- DSView/pv/dock/protocoldock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DSView/pv/dock/protocoldock.cpp b/DSView/pv/dock/protocoldock.cpp index 37463923..48280abf 100644 --- a/DSView/pv/dock/protocoldock.cpp +++ b/DSView/pv/dock/protocoldock.cpp @@ -105,7 +105,7 @@ void ProtocolDock::paintEvent(QPaintEvent *) { QStyleOption opt; opt.init(this); - QPainter p(this); + QPainter p(this->viewport()); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); }