diff -r 41300fa6a67c -r f7bc934e204c examples/assistant/simpletextviewer/findfiledialog.cpp --- a/examples/assistant/simpletextviewer/findfiledialog.cpp Tue Feb 02 00:43:10 2010 +0200 +++ b/examples/assistant/simpletextviewer/findfiledialog.cpp Wed Mar 31 11:06:36 2010 +0300 @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -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; }