summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-03 12:12:07 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-03 12:12:07 (GMT)
commita9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e (patch)
tree39a419cdf8f6ee8452280531d2463c470c8e0710 /examples
parentad46fadbe343e1b6caf94823237064551ab53c52 (diff)
parent787a20b76b7f6e0dd6c7a6331220b46b5eddff79 (diff)
downloadQt-a9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e.zip
Qt-a9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e.tar.gz
Qt-a9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: revert to fromUtf16() usage in fromWCharArray() Assistant examples: Fix missing QLatin1String. Added Czech translations. Webkit: Fix missing namespace. qmake: subdirs template: make distclean target use QMAKE_DISTCLEAN qmake: fix warnings qmake: Remove macro and simplify string expression previously using it qmake: use isActiveConfig() instead of hand-crafting comparisons Fix missing namespace. Assistant: Fix spelling mistakes. Assistant: Use const references in foreach loops. optimization: get rid of QString::fromUtf16() usage document QString::fromUtf16() slowness remove duplicated calculation of length remove pointless conditionals micro-optimization optimize qhash() Designer/uic/related examples: Fix source code scanning issues II.
Diffstat (limited to 'examples')
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.cpp6
-rw-r--r--examples/designer/taskmenuextension/tictactoedialog.h2
-rw-r--r--examples/network/qftp/sym_iap_util.h2
-rw-r--r--examples/uitools/textfinder/textfinder.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp
index 939d90a..1f11f69 100644
--- a/examples/assistant/simpletextviewer/findfiledialog.cpp
+++ b/examples/assistant/simpletextviewer/findfiledialog.cpp
@@ -102,7 +102,7 @@ void FindFileDialog::openFile(QTreeWidgetItem *item)
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::update()
void FindFileDialog::findFiles()
{
- QRegExp filePattern(fileNameComboBox->currentText() + "*");
+ QRegExp filePattern(fileNameComboBox->currentText() + '*');
filePattern.setPatternSyntax(QRegExp::Wildcard);
QDir directory(directoryComboBox->currentText());
@@ -127,7 +127,7 @@ void FindFileDialog::findFiles()
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;
}
diff --git a/examples/designer/taskmenuextension/tictactoedialog.h b/examples/designer/taskmenuextension/tictactoedialog.h
index aeaaaf4..3d810dd 100644
--- a/examples/designer/taskmenuextension/tictactoedialog.h
+++ b/examples/designer/taskmenuextension/tictactoedialog.h
@@ -55,7 +55,7 @@ class TicTacToeDialog : public QDialog
Q_OBJECT
public:
- TicTacToeDialog(TicTacToe *plugin = 0, QWidget *parent = 0);
+ explicit TicTacToeDialog(TicTacToe *plugin = 0, QWidget *parent = 0);
QSize sizeHint() const;
diff --git a/examples/network/qftp/sym_iap_util.h b/examples/network/qftp/sym_iap_util.h
index 8079d2c..41e43a9 100644
--- a/examples/network/qftp/sym_iap_util.h
+++ b/examples/network/qftp/sym_iap_util.h
@@ -298,7 +298,7 @@ QString qt_TDesC2QStringL(const TDesC& aDescriptor)
#ifdef QT_NO_UNICODE
return QString::fromLocal8Bit(aDescriptor.Ptr(), aDescriptor.Length());
#else
- return QString::fromUtf16(aDescriptor.Ptr(), aDescriptor.Length());
+ return QString((const QChar *)aDescriptor.Ptr(), aDescriptor.Length());
#endif
}
diff --git a/examples/uitools/textfinder/textfinder.cpp b/examples/uitools/textfinder/textfinder.cpp
index 855f11f..1b7c14b 100644
--- a/examples/uitools/textfinder/textfinder.cpp
+++ b/examples/uitools/textfinder/textfinder.cpp
@@ -116,7 +116,7 @@ void TextFinder::on_findButton_clicked()
if (isFirstTime == false)
document->undo();
- if (searchString == "") {
+ if (searchString.isEmpty()) {
QMessageBox::information(this, tr("Empty Search Field"),
"The search field is empty. Please enter a word and click Find.");
} else {