Clang: reduce warnings

This commit is contained in:
Adriaan de Groot 2017-06-27 07:36:46 -04:00
parent b20defc411
commit 3b0b05186a

View File

@ -24,14 +24,13 @@
KeyBoardPreview::KeyBoardPreview( QWidget* parent ) KeyBoardPreview::KeyBoardPreview( QWidget* parent )
: QWidget( parent ) : QWidget( parent )
, layout( "us" )
, space( 0 ) , space( 0 )
, usable_width( 0 ) , usable_width( 0 )
, key_w( 0 ) , key_w( 0 )
{ {
setMinimumSize(700, 191); setMinimumSize(700, 191);
layout = "us";
// We must set up the font size in pixels to fit the keys // We must set up the font size in pixels to fit the keys
lowerFont = QFont("Helvetica", 10, QFont::DemiBold); lowerFont = QFont("Helvetica", 10, QFont::DemiBold);
lowerFont.setPixelSize(16); lowerFont.setPixelSize(16);
@ -62,14 +61,14 @@ KeyBoardPreview::KeyBoardPreview( QWidget* parent )
void KeyBoardPreview::setLayout(QString layout) { void KeyBoardPreview::setLayout(QString _layout) {
this->layout = layout; layout = _layout;
} }
void KeyBoardPreview::setVariant(QString variant) { void KeyBoardPreview::setVariant(QString _variant) {
this->variant = variant; variant = _variant;
if (!loadCodes()) if (!loadCodes())
return; return;
@ -235,10 +234,10 @@ void KeyBoardPreview::paintEvent(QPaintEvent* event) {
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
if (first_key_w > 0) { if (first_key_w > 0) {
first_key_w = first_key_w*1.375; first_key_w = int(first_key_w * 1.375);
if (kb == &kbList[KB_105] && i == 3) if (kb == &kbList[KB_105] && i == 3)
first_key_w = key_w * 1.275; first_key_w = int(key_w * 1.275);
p.drawRoundedRect(QRectF(6, y, first_key_w, key_w), rx, rx); p.drawRoundedRect(QRectF(6, y, first_key_w, key_w), rx, rx);
x = 6 + first_key_w + space; x = 6 + first_key_w + space;