Fix warning about narrowing inside {}

Such as
qdialogbuttonbox.cpp:259:1: warning: narrowing conversion of
‘2147483650u’ from ‘unsigned int’ to ‘const int’ inside { }
[-Wnarrowing]

Change-Id: I00d66d96ef3af1a46935a58119668a20f8fd58c7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
bb10
Olivier Goffart 2012-04-30 14:14:11 +02:00 committed by Qt by Nokia
parent 62185f07f8
commit e1d5355325
2 changed files with 3 additions and 3 deletions

View File

@ -1133,7 +1133,7 @@ void QTriangulator<T>::ComplexToSimple::initEdges()
} else {
Q_ASSERT(i + 1 < m_parent->m_indices.size());
// {node, from, to, next, previous, winding, mayIntersect, pointingUp, originallyPointingUp}
Edge edge = {0, m_parent->m_indices.at(i), m_parent->m_indices.at(i + 1), -1, -1, 0, true, false, false};
Edge edge = {0, int(m_parent->m_indices.at(i)), int(m_parent->m_indices.at(i + 1)), -1, -1, 0, true, false, false};
m_edges.add(edge);
}
}

View File

@ -211,7 +211,7 @@ static QDialogButtonBox::ButtonRole roleFor(QDialogButtonBox::StandardButton but
return QDialogButtonBox::InvalidRole;
}
static const int layouts[2][5][14] =
static const uint layouts[2][5][14] =
{
// Qt::Horizontal
{
@ -406,7 +406,7 @@ void QDialogButtonBoxPrivate::layoutButtons()
tmpPolicy = 4; // Mac modeless
}
const int *currentLayout = layouts[orientation == Qt::Vertical][tmpPolicy];
const uint *currentLayout = layouts[orientation == Qt::Vertical][tmpPolicy];
if (center)
buttonLayout->addStretch();