Fix some code scanning issues.

QString: Use QChar where appropriate.
This commit is contained in:
Friedemann Kleint
2010-02-01 12:43:56 +01:00
parent d2235489e8
commit 2fd8b2d7ff
54 changed files with 170 additions and 160 deletions

View File

@@ -152,7 +152,7 @@ void WatchData::setValue(const QString &value0)
}
// avoid duplicated information
if (value.startsWith("(") && value.contains(") 0x"))
if (value.startsWith(QLatin1Char('(')) && value.contains(") 0x"))
value = value.mid(value.lastIndexOf(") 0x") + 2);
// doubles are sometimes displayed as "@0x6141378: 1.2".
@@ -171,8 +171,8 @@ void WatchData::setValue(const QString &value0)
// pointer type information is available in the 'type'
// column. No need to duplicate it here.
if (value.startsWith("(" + type + ") 0x"))
value = value.section(" ", -1, -1);
if (value.startsWith(QLatin1Char('(') + type + ") 0x"))
value = value.section(QLatin1Char(' '), -1, -1);
setValueUnneeded();
}
@@ -796,7 +796,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
switch (idx.column()) {
case 0:
if (data.name == QLatin1String("*") && item->parent)
return QLatin1String("*") + item->parent->name;
return QLatin1Char('*') + item->parent->name;
return data.name;
case 1: {
int format = m_handler->m_individualFormats.value(data.iname, -1);