diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-05-14 13:50:46 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-14 13:57:37 +0200 |
commit | fd5c099eea26a8101e2cc0dc3237d1250158b895 (patch) | |
tree | 562e5f40ee504c9fdc4feb23070836150f70af63 /src/quick/util | |
parent | a1151929fffc765e128d72d170342020b34dd0b3 (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')
-rw-r--r-- | src/quick/util/qquickchangeset.cpp | 8 | ||||
-rw-r--r-- | src/quick/util/qquickfontloader.cpp | 2 | ||||
-rw-r--r-- | src/quick/util/qquicklistcompositor.cpp | 38 |
3 files changed, 24 insertions, 24 deletions
diff --git a/src/quick/util/qquickchangeset.cpp b/src/quick/util/qquickchangeset.cpp index b6b5adb60c..c335408c02 100644 --- a/src/quick/util/qquickchangeset.cpp +++ b/src/quick/util/qquickchangeset.cpp @@ -457,22 +457,22 @@ QDebug operator <<(QDebug debug, const QQuickChangeSet &set) foreach (const QQuickChangeSet::Remove &remove, set.removes()) debug << remove; foreach (const QQuickChangeSet::Insert &insert, set.inserts()) debug << insert; foreach (const QQuickChangeSet::Change &change, set.changes()) debug << change; - return debug.nospace() << ")"; + return debug.nospace() << ')'; } QDebug operator <<(QDebug debug, const QQuickChangeSet::Remove &remove) { - return (debug.nospace() << "Remove(" << remove.index << "," << remove.count << "," << remove.moveId << ")").space(); + return (debug.nospace() << "Remove(" << remove.index << ',' << remove.count << ',' << remove.moveId << ')').space(); } QDebug operator <<(QDebug debug, const QQuickChangeSet::Insert &insert) { - return (debug.nospace() << "Insert(" << insert.index << "," << insert.count << "," << insert.moveId << ")").space(); + return (debug.nospace() << "Insert(" << insert.index << ',' << insert.count << ',' << insert.moveId << ')').space(); } QDebug operator <<(QDebug debug, const QQuickChangeSet::Change &change) { - return (debug.nospace() << "Change(" << change.index << "," << change.count << ")").space(); + return (debug.nospace() << "Change(" << change.index << ',' << change.count << ')').space(); } QT_END_NAMESPACE diff --git a/src/quick/util/qquickfontloader.cpp b/src/quick/util/qquickfontloader.cpp index 2868270121..c12148407f 100644 --- a/src/quick/util/qquickfontloader.cpp +++ b/src/quick/util/qquickfontloader.cpp @@ -243,7 +243,7 @@ void QQuickFontLoader::updateFontInfo(const QString& name, QQuickFontLoader::Sta } if (status != d->status) { if (status == Error) - qmlInfo(this) << "Cannot load font: \"" << d->url.toString() << "\""; + qmlInfo(this) << "Cannot load font: \"" << d->url.toString() << '"'; d->status = status; emit statusChanged(); } 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 |