From 1f39789f2e2403c5f02369f89ef0a582112c610e Mon Sep 17 00:00:00 2001 From: Phenom Date: Sat, 15 Jul 2017 18:32:53 +0200 Subject: [PATCH] Fix clang warning: 'RSGraphWidget::sizeHint' hides overloaded virtual function /retroshare-gui/src/gui/common/RSGraphWidget.h:173: warning: 'RSGraphWidget::sizeHint' hides overloaded virtual function [- Woverloaded-virtual] virtual QSizeF sizeHint( Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const; /usr/include/qt4/QtGui/qframe.h:76: hidden overloaded virtual function 'QFrame::sizeHint' declared here: different number of parameters (0 vs 2) QSize sizeHint() const; --- .../src/gui/common/RSGraphWidget.cpp | 30 +++++++++---------- retroshare-gui/src/gui/common/RSGraphWidget.h | 3 +- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/retroshare-gui/src/gui/common/RSGraphWidget.cpp b/retroshare-gui/src/gui/common/RSGraphWidget.cpp index 8bafec87f..e66a57a6d 100644 --- a/retroshare-gui/src/gui/common/RSGraphWidget.cpp +++ b/retroshare-gui/src/gui/common/RSGraphWidget.cpp @@ -362,21 +362,21 @@ void RSGraphWidget::paintEvent(QPaintEvent *) _painter->end(); } -QSizeF RSGraphWidget::sizeHint(Qt::SizeHint which, const QSizeF& /* constraint */) const -{ - float FS = QFontMetricsF(font()).height(); - //float fact = FS/14.0 ; - - switch(which) - { -default: - case Qt::MinimumSize: - case Qt::PreferredSize: - return QSizeF(70*FS,12*FS); - case Qt::MaximumSize: - return QSizeF(700*FS,120*FS); - } -} +//QSizeF RSGraphWidget::sizeHint(Qt::SizeHint which, const QSizeF& /* constraint */) const +//{ +// float FS = QFontMetricsF(font()).height(); +// //float fact = FS/14.0 ; +// +// switch(which) +// { +//default: +// case Qt::MinimumSize: +// case Qt::PreferredSize: +// return QSizeF(70*FS,12*FS); +// case Qt::MaximumSize: +// return QSizeF(700*FS,120*FS); +// } +//} QColor RSGraphWidget::getColor(const std::string& name) { diff --git a/retroshare-gui/src/gui/common/RSGraphWidget.h b/retroshare-gui/src/gui/common/RSGraphWidget.h index 7c88086f4..f35b8717e 100644 --- a/retroshare-gui/src/gui/common/RSGraphWidget.h +++ b/retroshare-gui/src/gui/common/RSGraphWidget.h @@ -170,7 +170,8 @@ protected: /** Overloaded QWidget::paintEvent() */ void paintEvent(QPaintEvent *event); - virtual QSizeF sizeHint( Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const; +//QSize QFrame::sizeHint() const; +// virtual QSizeF sizeHint( Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const; protected slots: void updateIfPossible() ;