diff -r 3b1da2848fc7 -r d3bac044e0f0 examples/assistant/simpletextviewer/findfiledialog.cpp --- a/examples/assistant/simpletextviewer/findfiledialog.cpp Fri Feb 19 23:40:16 2010 +0200 +++ b/examples/assistant/simpletextviewer/findfiledialog.cpp Fri Mar 12 15:46:37 2010 +0200 @@ -102,7 +102,7 @@ if (file.open(QIODevice::ReadOnly)) { QString data(file.readAll()); - if (fileName.endsWith(".html")) + if (fileName.endsWith(QLatin1String(".html"))) currentEditor->setHtml(data); else currentEditor->setPlainText(data); @@ -119,7 +119,7 @@ void FindFileDialog::findFiles() { - QRegExp filePattern(fileNameComboBox->currentText() + "*"); + QRegExp filePattern(fileNameComboBox->currentText() + '*'); filePattern.setPatternSyntax(QRegExp::Wildcard); QDir directory(directoryComboBox->currentText()); @@ -127,7 +127,7 @@ QStringList allFiles = directory.entryList(QDir::Files | QDir::NoSymLinks); QStringList matchingFiles; - foreach (QString file, allFiles) { + foreach (const QString &file, allFiles) { if (filePattern.exactMatch(file)) matchingFiles << file; }