summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2012-04-30 12:14:11 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-23 12:42:41 (GMT)
commit500ce56eb2a3554e1f968fb1cbeaeb9bfd3e1ff8 (patch)
tree329ee113841d9cb6bb4fb7fbf2e8741691b50c27
parent4b69ada361117757a1d9dfd6a9cd444fcb433edc (diff)
downloadQt-500ce56eb2a3554e1f968fb1cbeaeb9bfd3e1ff8.zip
Qt-500ce56eb2a3554e1f968fb1cbeaeb9bfd3e1ff8.tar.gz
Qt-500ce56eb2a3554e1f968fb1cbeaeb9bfd3e1ff8.tar.bz2
Fix warning about narrowing inside {}
Such as qdialogbuttonbox.cpp:259:1: warning: narrowing conversion of ‘2147483650u’ from ‘unsigned int’ to ‘const int’ inside { } [-Wnarrowing] Cherry-picked from qtbase/e1d53553259e7edefb2a76712fd6a1ddc072d22d. Change-Id: I7fa4b80cc21d5f4765c229f62ff977e7b9076e99 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
-rw-r--r--src/gui/widgets/qdialogbuttonbox.cpp4
-rw-r--r--src/opengl/gl2paintengineex/qtriangulator.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp
index b0f14ca..8e69e5f 100644
--- a/src/gui/widgets/qdialogbuttonbox.cpp
+++ b/src/gui/widgets/qdialogbuttonbox.cpp
@@ -212,7 +212,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
{
@@ -407,7 +407,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();
diff --git a/src/opengl/gl2paintengineex/qtriangulator.cpp b/src/opengl/gl2paintengineex/qtriangulator.cpp
index 3e9dbb8..e8d7db5 100644
--- a/src/opengl/gl2paintengineex/qtriangulator.cpp
+++ b/src/opengl/gl2paintengineex/qtriangulator.cpp
@@ -1710,7 +1710,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);
}
}