diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-03 12:12:07 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-03 12:12:07 (GMT) |
commit | a9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e (patch) | |
tree | 39a419cdf8f6ee8452280531d2463c470c8e0710 /src/tools | |
parent | ad46fadbe343e1b6caf94823237064551ab53c52 (diff) | |
parent | 787a20b76b7f6e0dd6c7a6331220b46b5eddff79 (diff) | |
download | Qt-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 'src/tools')
-rw-r--r-- | src/tools/uic/cpp/cppwriteinitialization.cpp | 6 | ||||
-rw-r--r-- | src/tools/uic3/converter.cpp | 6 | ||||
-rw-r--r-- | src/tools/uic3/main.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index d9aff1b..8099ffa 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -2787,8 +2787,8 @@ static void generateMultiDirectiveBegin(QTextStream &outputStream, const QSet<QS return; QMap<QString, bool> map; // bool is dummy. The idea is to sort that (always generate in the same order) by putting a set into a map - foreach (QString str, directives) - map[str] = true; + foreach (const QString &str, directives) + map.insert(str, true); if (map.size() == 1) { outputStream << "#ifndef " << map.constBegin().key() << endl; @@ -2797,7 +2797,7 @@ static void generateMultiDirectiveBegin(QTextStream &outputStream, const QSet<QS outputStream << "#if"; bool doOr = false; - foreach (QString str, map.keys()) { + foreach (const QString &str, map.keys()) { if (doOr) outputStream << " ||"; outputStream << " !defined(" << str << ')'; diff --git a/src/tools/uic3/converter.cpp b/src/tools/uic3/converter.cpp index 2bf293d..e1b4b38 100644 --- a/src/tools/uic3/converter.cpp +++ b/src/tools/uic3/converter.cpp @@ -401,7 +401,7 @@ DomUI *Ui3Reader::generateUi4(const QDomElement &widget) bool resolved = false; if (objName == receiver) { // see if it's a custom slot - foreach (QString cs, ui_custom_slots) { + foreach (const QString &cs, ui_custom_slots) { if (cs == slot) { resolved = true; break; @@ -1122,7 +1122,7 @@ void Ui3Reader::createProperties(const QDomElement &n, QList<DomProperty*> *prop if (prop->kind() == DomProperty::Set) { QStringList flags = prop->elementSet().split(QLatin1Char('|')); QStringList v; - foreach (QString fl, flags) { + foreach (const QString &fl, flags) { QString e = WidgetInfo::resolveEnumerator(className, fl); if (e.isEmpty()) { e = m_porting->renameEnumerator(className + QLatin1String("::") + fl); @@ -1283,7 +1283,7 @@ QString Ui3Reader::fixType(const QString &t) const QString newText = t; //split type name on <>*& and whitespace QStringList typeNames = t.split(QRegExp(QLatin1String("<|>|\\*|&| ")), QString::SkipEmptyParts); - foreach(QString typeName , typeNames) { + foreach(const QString &typeName , typeNames) { QString newName = fixClassName(typeName); if( newName != typeName ) { newText.replace(typeName, newName); diff --git a/src/tools/uic3/main.cpp b/src/tools/uic3/main.cpp index 6acc94f..1ebb76a 100644 --- a/src/tools/uic3/main.cpp +++ b/src/tools/uic3/main.cpp @@ -338,10 +338,10 @@ int runUic3(int argc, char * argv[]) QStringList globalIncludes, localIncludes; ui3.computeDeps(e, globalIncludes, localIncludes, impl); - foreach (QString i, globalIncludes) + foreach (const QString &i, globalIncludes) printf("%s\n", i.toLatin1().constData()); - foreach (QString i, localIncludes) + foreach (const QString &i, localIncludes) printf("%s\n", i.toLatin1().constData()); if (impl) |