diff options
author | Sami Merila <sami.merila@nokia.com> | 2010-03-22 06:39:20 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2010-03-22 06:39:20 (GMT) |
commit | 120e79b2726e8aef63eb321fe3de984a27921d9e (patch) | |
tree | 3343af059d098f0cd609348c69dfb78d1225a436 /src | |
parent | 06a3cc7b80c070b20e96cc1454e43d7d138bf2ce (diff) | |
download | Qt-120e79b2726e8aef63eb321fe3de984a27921d9e.zip Qt-120e79b2726e8aef63eb321fe3de984a27921d9e.tar.gz Qt-120e79b2726e8aef63eb321fe3de984a27921d9e.tar.bz2 |
QS60Style assert fails to detect an index failure
QS60Style asserts that a given index is correct when setting theme
colors. Unfortunately it uses less-and-equal-to operator ('<='), which
is incorrect. It should use less-than ('<')operator, otherwise the
assert fails when index is equal to number of items in the color
table.
Task-number: QT-3078
Reviewed-by: Alessandro Portale
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 5202701..14782d8 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -1121,7 +1121,7 @@ QColor QS60StylePrivate::s60Color(QS60StyleEnums::ColorLists list, &KAknsIIDQsnParentColors, &KAknsIIDQsnTextColors }; - Q_ASSERT((int)list <= (int)sizeof(idMap)/sizeof(idMap[0])); + Q_ASSERT((int)list < (int)sizeof(idMap)/sizeof(idMap[0])); const QColor color = QS60StyleModeSpecifics::colorValue(*idMap[(int) list], index - 1); return option ? QS60StylePrivate::stateColor(color, option) : color; } |