Fix Clang warnings: implicit conversion from 'double' to 'int'

warning: implicit conversion from 'double' to 'int' changes value from
2.5 to 2 [-Wliteral-conversion]
        QSize buttonSize = QSize(iconSize + QSize(FMM,FMM));
This commit is contained in:
Phenom 2017-03-19 10:51:48 +01:00 committed by csoler
parent 07b67e9cc9
commit 6f2d7bbca0

View File

@ -76,7 +76,7 @@ ChatWidget::ChatWidget(QWidget *parent) :
int iconHeight = FMM*QFontMetricsF(font()).height() ;
QSize iconSize = QSize(iconHeight,iconHeight);
QSize buttonSize = QSize(iconSize + QSize(FMM,FMM));
QSize buttonSize = QSize(iconSize + QSize((int)FMM,(int)FMM));
newMessages = false;
typing = false;
@ -258,7 +258,7 @@ void ChatWidget::addChatBarWidget(QWidget *w)
{
int iconHeight = FMM*QFontMetricsF(font()).height() ;
QSize iconSize = QSize(iconHeight,iconHeight);
QSize buttonSize = QSize(iconSize + QSize(FMM,FMM));
QSize buttonSize = QSize(iconSize + QSize((int)FMM,(int)FMM));
w->setFixedSize(buttonSize);
ui->pluginButtonFrame->layout()->addWidget(w) ;
}