aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquicklistcompositor.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-05-14 13:50:46 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-14 13:57:37 +0200
commitfd5c099eea26a8101e2cc0dc3237d1250158b895 (patch)
tree562e5f40ee504c9fdc4feb23070836150f70af63 /src/quick/util/qquicklistcompositor.cpp
parenta1151929fffc765e128d72d170342020b34dd0b3 (diff)
QtQuick: Fix string related warnings, single character strings.
- Fix warnings about truncation from size_t to int (MSVC 2010, 64bit). - Remove single character strings. Change-Id: Iaf4406e4e04d55d2d8b762f3433269868842a6f9 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/quick/util/qquicklistcompositor.cpp')
-rw-r--r--src/quick/util/qquicklistcompositor.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/quick/util/qquicklistcompositor.cpp b/src/quick/util/qquicklistcompositor.cpp
index d60fe5fb79..2afc6e9384 100644
--- a/src/quick/util/qquicklistcompositor.cpp
+++ b/src/quick/util/qquicklistcompositor.cpp
@@ -1136,17 +1136,17 @@ QDebug operator <<(QDebug debug, const QQuickListCompositor::Range &range)
{
(debug.nospace()
<< "Range("
- << range.list) << " "
- << range.index << " "
- << range.count << " "
- << (range.isUnresolved() ? "U" : "0")
- << (range.append() ? "A" : "0")
- << (range.prepend() ? "P" : "0");
+ << range.list) << ' '
+ << range.index << ' '
+ << range.count << ' '
+ << (range.isUnresolved() ? 'U' : '0')
+ << (range.append() ? 'A' : '0')
+ << (range.prepend() ? 'P' : '0');
for (int i = QQuickListCompositor::MaximumGroupCount - 1; i >= 2; --i)
- debug << (range.inGroup(i) ? "1" : "0");
+ debug << (range.inGroup(i) ? '1' : '0');
return (debug
- << (range.inGroup(QQuickListCompositor::Default) ? "D" : "0")
- << (range.inGroup(QQuickListCompositor::Cache) ? "C" : "0"));
+ << (range.inGroup(QQuickListCompositor::Default) ? 'D' : '0')
+ << (range.inGroup(QQuickListCompositor::Cache) ? 'C' : '0'));
}
static void qt_print_indexes(QDebug &debug, int count, const int *indexes)
@@ -1159,21 +1159,21 @@ QDebug operator <<(QDebug debug, const QQuickListCompositor::iterator &it)
{
(debug.nospace() << "iterator(" << it.group).space() << "offset:" << it.offset;
qt_print_indexes(debug, it.groupCount, it.index);
- return ((debug << **it).nospace() << ")").space();
+ return ((debug << **it).nospace() << ')').space();
}
static QDebug qt_print_change(QDebug debug, const char *name, const QQuickListCompositor::Change &change)
{
- debug.nospace() << name << "(" << change.moveId << " " << change.count << " ";
+ debug.nospace() << name << '(' << change.moveId << ' ' << change.count << ' ';
for (int i = QQuickListCompositor::MaximumGroupCount - 1; i >= 2; --i)
- debug << (change.inGroup(i) ? "1" : "0");
- debug << (change.inGroup(QQuickListCompositor::Default) ? "D" : "0")
- << (change.inGroup(QQuickListCompositor::Cache) ? "C" : "0");
+ debug << (change.inGroup(i) ? '1' : '0');
+ debug << (change.inGroup(QQuickListCompositor::Default) ? 'D' : '0')
+ << (change.inGroup(QQuickListCompositor::Cache) ? 'C' : '0');
int i = QQuickListCompositor::MaximumGroupCount - 1;
for (; i >= 0 && !change.inGroup(i); --i) {}
for (; i >= 0; --i)
- debug << " " << change.index[i];
- return (debug << ")").maybeSpace();
+ debug << ' ' << change.index[i];
+ return (debug << ')').maybeSpace();
}
QDebug operator <<(QDebug debug, const QQuickListCompositor::Change &change)
@@ -1199,16 +1199,16 @@ QDebug operator <<(QDebug debug, const QQuickListCompositor &list)
debug.nospace() << "QQuickListCompositor(";
qt_print_indexes(debug, list.m_groupCount, list.m_end.index);
for (QQuickListCompositor::Range *range = list.m_ranges.next; range != &list.m_ranges; range = range->next) {
- (debug << "\n").space();
+ (debug << '\n').space();
qt_print_indexes(debug, list.m_groupCount, indexes);
- debug << " " << *range;
+ debug << ' ' << *range;
for (int i = 0; i < list.m_groupCount; ++i) {
if (range->inGroup(i))
indexes[i] += range->count;
}
}
- return (debug << ")").maybeSpace();
+ return (debug << ')').maybeSpace();
}
QT_END_NAMESPACE