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

@@ -137,15 +137,18 @@ void GettingStartedWelcomePageWidget::updateExamples(const QString& examplePath,
inExamples = true;
}
if (inExamples && reader.name() == "example") {
QString name = reader.attributes().value(QLatin1String("name")).toString();
QString fn = reader.attributes().value(QLatin1String("filename")).toString();
QString relativeProPath = '/' + dirName + '/' + fn + '/' + fn + ".pro";
const QChar slash = QLatin1Char('/');
const QString name = reader.attributes().value(QLatin1String("name")).toString();
const QString fn = reader.attributes().value(QLatin1String("filename")).toString();
const QString relativeProPath = slash + dirName + slash + fn + slash + fn + QLatin1String(".pro");
QString fileName = examplePath + relativeProPath;
if (!QFile::exists(fileName))
fileName = sourcePath + "/examples" + relativeProPath;
QString helpPath = "qthelp://com.trolltech.qt/qdoc/" + dirName.replace("/", "-") + "-" + fn + ".html";
fileName = sourcePath + QLatin1String("/examples") + relativeProPath;
QString helpPath = QLatin1String("qthelp://com.trolltech.qt/qdoc/") +
dirName.replace(slash, QLatin1Char('-')) +
QLatin1Char('-') + fn + QLatin1String(".html");
ui->examplesComboBox->addItem(" " + name, fileName);
ui->examplesComboBox->addItem(QLatin1String(" ") + name, fileName);
ui->examplesComboBox->setItemData(ui->examplesComboBox->count()-1, helpPath, Qt::UserRole+1);
}
break;