mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
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;
This commit is contained in:
parent
300359863e
commit
1f39789f2e
@ -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)
|
||||
{
|
||||
|
@ -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() ;
|
||||
|
Loading…
Reference in New Issue
Block a user