diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-01 09:28:00 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-01 09:28:00 (GMT) |
commit | a788f7e3a04ec741d59ef458a40e39d918dc1df0 (patch) | |
tree | d604e4f206473b125c335b61487d833fd0926af4 /src/tools/uic3 | |
parent | f3da2f414f9fce9aa014da79be9f50c075c60936 (diff) | |
download | Qt-a788f7e3a04ec741d59ef458a40e39d918dc1df0.zip Qt-a788f7e3a04ec741d59ef458a40e39d918dc1df0.tar.gz Qt-a788f7e3a04ec741d59ef458a40e39d918dc1df0.tar.bz2 |
Designer/uic/related examples: Fix source code scanning issues II.
Fix spelling errors, foreach()/QString usage, explicit constructors.
Reviewed-By: Joerg Bornemann <joerg.bornemann@trolltech.com>
Diffstat (limited to 'src/tools/uic3')
-rw-r--r-- | src/tools/uic3/converter.cpp | 6 | ||||
-rw-r--r-- | src/tools/uic3/main.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
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) |